openfl / lime

A foundational Haxe framework for cross-platform development
https://lime.openfl.org/
MIT License
749 stars 359 forks source link

Doc on ThreadPool.new doesn't match the function #1772

Closed 47rooks closed 3 months ago

47rooks commented 3 months ago

On 8.2.0-Dev with the updated ThreadPool you have the following:


    /**
        __Call this only from the main thread.__

        @param doWork A single function capable of performing all of this pool's
        jobs. Always provide `doWork`, even though it's marked as optional.
        @param mode Defaults to `MULTI_THREADED` on most targets, but
        `SINGLE_THREADED` in HTML5. In HTML5, `MULTI_THREADED` mode uses web
        workers, which impose additional restrictions.
        @param workLoad (Single-threaded mode only) A rough estimate of how much
        of the app's time should be spent on this `ThreadPool`. For instance,
        the default value of 1/2 means this worker will take up about half the
        app's available time every frame. See `workIterations` for instructions
        to improve the accuracy of this estimate.
    **/
    public function new(minThreads:Int = 0, maxThreads:Int = 1, mode:ThreadMode = null, workLoad:Float = 1/2)

minThreads and maxThreads are not doc'd and doWork no longer exists.

player-03 commented 3 months ago

Fixed, thanks!