File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -14,26 +14,27 @@ import hx.concurrent.thread.Threads;
1414
1515
1616class ThreadPool extends ServiceBase {
17+ /**
18+ * The default amount of time a worker sleeps waiting for work
19+ */
20+ public static final DEFAULT_POLL_PERIOD = 0.001 ;
1721
1822 static final _threadIDs = new AtomicInt ();
1923
2024 var _spawnedThreadCount = new AtomicInt (0 );
2125 var _workingThreadCount = new AtomicInt (0 );
2226 final _workQueue = new Queue <Task >();
23- var _pollPeriod = DEFAULT_POLL_PERIOD ;
2427
2528 public final threadCount : Int ;
2629
2730 /**
2831 * The amount of time a worker sleeps waiting for work
2932 */
30- public static var DEFAULT_POLL_PERIOD = 0.001 ;
31- public var pollPeriod (get , set ): Float ;
32- inline function get_pollPeriod (): Float return _pollPeriod ;
33+ public var pollPeriod (default , set ): Float = DEFAULT_POLL_PERIOD ;
3334 inline function set_pollPeriod (value : Float ) {
3435 if (value <= 0 )
3536 throw " [value] must be >= 0" ;
36- return _pollPeriod = value ;
37+ return pollPeriod = value ;
3738 }
3839
3940 /**
@@ -60,7 +61,6 @@ class ThreadPool extends ServiceBase {
6061 start ();
6162 }
6263
63-
6464
6565 /**
6666 * Waits for all submitted tasks being executed.
You can’t perform that action at this time.
0 commit comments