@@ -23,7 +23,7 @@ class hamstersjs {
2323 constructor ( ) {
2424 'use strict' ;
2525
26- this . version = '5.5.2 ' ;
26+ this . version = '5.5.3 ' ;
2727 this . run = this . hamstersRun . bind ( this ) ;
2828 this . promise = this . hamstersPromise . bind ( this ) ;
2929 this . init = this . inititializeLibrary . bind ( this ) ;
@@ -84,36 +84,36 @@ class hamstersjs {
8484 hamstersTask ( params , functionToRun ) {
8585 params . array = params . array || [ ] ;
8686 const task = {
87- input : { } ,
88- output : [ ] ,
89- scheduler : {
90- count : 0 ,
91- threads : params . threads || 1 ,
92- workers : [ ]
93- }
87+ input : { } ,
88+ output : [ ] ,
89+ scheduler : {
90+ count : 0 ,
91+ threads : params . threads || 1 ,
92+ workers : [ ]
93+ }
9494 } ;
9595
9696 if ( this . habitat . legacy ) {
97- task . scheduler . threads = 1 ;
98- if ( ! this . habitat . node && ! this . habitat . isIE ) {
99- params . hamstersJob = functionToRun ;
100- }
97+ task . scheduler . threads = 1 ;
98+ if ( ! this . habitat . node && ! this . habitat . isIE ) {
99+ params . hamstersJob = functionToRun ;
100+ }
101101 } else {
102- params . hamstersJob = this . habitat . legacy ? functionToRun : this . data . prepareFunction ( functionToRun ) ;
103- if ( params . sharedArray && this . habitat . atomics ) {
104- task . scheduler . indexes = params . indexes || this . data . getSubArrayIndexes ( params . sharedArray , task . scheduler . threads ) ;
105- task . scheduler . sharedBuffer = this . data . setupSharedArrayBuffer ( params . sharedArray ) ;
106- } else {
107- task . scheduler . indexes = params . indexes || this . data . getSubArrayIndexes ( params . array , task . scheduler . threads ) ;
108- }
102+ params . hamstersJob = this . habitat . legacy ? functionToRun : this . data . prepareFunction ( functionToRun ) ;
103+ if ( params . sharedArray && this . habitat . atomics ) {
104+ task . scheduler . indexes = params . indexes || this . data . getSubArrayIndexes ( params . sharedArray , task . scheduler . threads ) ;
105+ task . scheduler . sharedBuffer = this . data . setupSharedArrayBuffer ( params . sharedArray ) ;
106+ } else {
107+ task . scheduler . indexes = params . indexes || this . data . getSubArrayIndexes ( params . array , task . scheduler . threads ) ;
108+ }
109109 }
110110
111111 if ( this . habitat . debug ) {
112112 task . scheduler . metrics = {
113- created_at : Date . now ( ) ,
114- started_at : null ,
115- completed_at : null ,
116- threads : [ ]
113+ created_at : Date . now ( ) ,
114+ started_at : null ,
115+ completed_at : null ,
116+ threads : [ ]
117117 } ;
118118 }
119119
0 commit comments