fix: race condition or something

This commit is contained in:
orion 2024-05-05 14:15:59 -05:00
parent d6c6130279
commit bee63db2e7
Signed by: orion
GPG Key ID: 6D4165AE4C928719
3 changed files with 0 additions and 90 deletions

View File

@ -16,7 +16,6 @@ workspace:
- foreign: ">=7.0.0 <8.0.0" - foreign: ">=7.0.0 <8.0.0"
- foreign-object: ">=4.1.0 <5.0.0" - foreign-object: ">=4.1.0 <5.0.0"
- integers: ">=6.0.0 <7.0.0" - integers: ">=6.0.0 <7.0.0"
- js-timers
- lists: ">=7.0.0 <8.0.0" - lists: ">=7.0.0 <8.0.0"
- maybe: ">=6.0.0 <7.0.0" - maybe: ">=6.0.0 <7.0.0"
- newtype: ">=5.0.0 <6.0.0" - newtype: ">=5.0.0 <6.0.0"
@ -35,7 +34,6 @@ workspace:
- tailrec: ">=6.1.0 <7.0.0" - tailrec: ">=6.1.0 <7.0.0"
- transformers: ">=6.0.0 <7.0.0" - transformers: ">=6.0.0 <7.0.0"
- typelevel-prelude: ">=7.0.0 <8.0.0" - typelevel-prelude: ">=7.0.0 <8.0.0"
- unlift: ">=1.0.1 <2.0.0"
- unsafe-coerce: ">=6.0.0 <7.0.0" - unsafe-coerce: ">=6.0.0 <7.0.0"
test_dependencies: test_dependencies:
- console - console
@ -44,7 +42,6 @@ workspace:
- arraybuffer-types - arraybuffer-types
- arrays - arrays
- bifunctors - bifunctors
- catenable-lists
- console - console
- const - const
- contravariant - contravariant
@ -63,8 +60,6 @@ workspace:
- foreign - foreign
- foreign-object - foreign-object
- formatters - formatters
- free
- freet
- functions - functions
- functors - functors
- gen - gen
@ -72,11 +67,9 @@ workspace:
- integers - integers
- invariant - invariant
- js-date - js-date
- js-timers
- lazy - lazy
- lists - lists
- maybe - maybe
- monad-control
- newtype - newtype
- node-buffer - node-buffer
- node-event-emitter - node-event-emitter
@ -106,7 +99,6 @@ workspace:
- typelevel-prelude - typelevel-prelude
- unfoldable - unfoldable
- unicode - unicode
- unlift
- unsafe-coerce - unsafe-coerce
extra_packages: {} extra_packages: {}
packages: packages:
@ -166,18 +158,6 @@ packages:
- newtype - newtype
- prelude - prelude
- tuples - tuples
catenable-lists:
type: registry
version: 7.0.0
integrity: sha256-76vYENhwF4BWTBsjeLuErCH2jqVT4M3R1HX+4RwSftA=
dependencies:
- control
- foldable-traversable
- lists
- maybe
- prelude
- tuples
- unfoldable
console: console:
type: registry type: registry
version: 6.1.0 version: 6.1.0
@ -371,40 +351,6 @@ packages:
- parsing - parsing
- prelude - prelude
- transformers - transformers
free:
type: registry
version: 7.1.0
integrity: sha256-JAumgEsGSzJCNLD8AaFvuX7CpqS5yruCngi6yI7+V5k=
dependencies:
- catenable-lists
- control
- distributive
- either
- exists
- foldable-traversable
- invariant
- lazy
- maybe
- prelude
- tailrec
- transformers
- tuples
- unsafe-coerce
freet:
type: registry
version: 7.0.0
integrity: sha256-zkL6wU4ZPq8xz1kGFxoliWqyhBksepMJTyA68VEBaJo=
dependencies:
- aff
- bifunctors
- effect
- either
- exists
- free
- prelude
- tailrec
- transformers
- tuples
functions: functions:
type: registry type: registry
version: 6.0.0 version: 6.0.0
@ -479,12 +425,6 @@ packages:
- foreign - foreign
- integers - integers
- now - now
js-timers:
type: registry
version: 6.1.0
integrity: sha256-znHWLSSOYw15P5DTcsAdal2lf7nGA2yayLdOZ2t5r7o=
dependencies:
- effect
lazy: lazy:
type: registry type: registry
version: 6.0.0 version: 6.0.0
@ -520,15 +460,6 @@ packages:
- invariant - invariant
- newtype - newtype
- prelude - prelude
monad-control:
type: registry
version: 5.0.0
integrity: sha256-bgfDW30wbIm70NR1Tvvh9P+VFQMDh1wK2sSJXCj/dZc=
dependencies:
- aff
- freet
- identity
- lists
newtype: newtype:
type: registry type: registry
version: 5.0.0 version: 5.0.0
@ -852,23 +783,6 @@ packages:
- foldable-traversable - foldable-traversable
- maybe - maybe
- strings - strings
unlift:
type: registry
version: 1.0.1
integrity: sha256-nbBCVV0fZz/3UHKoW11dcTwBYmQOIgK31ht2BN47RPw=
dependencies:
- aff
- effect
- either
- freet
- identity
- lists
- maybe
- monad-control
- prelude
- st
- transformers
- tuples
unsafe-coerce: unsafe-coerce:
type: registry type: registry
version: 6.0.0 version: 6.0.0

View File

@ -10,7 +10,6 @@ package:
strict: true strict: true
pedanticPackages: true pedanticPackages: true
dependencies: dependencies:
- js-timers
- aff: ">=7.1.0 <8.0.0" - aff: ">=7.1.0 <8.0.0"
- arrays: ">=7.3.0 <8.0.0" - arrays: ">=7.3.0 <8.0.0"
- bifunctors: ">=6.0.0 <7.0.0" - bifunctors: ">=6.0.0 <7.0.0"
@ -42,7 +41,6 @@ package:
- tailrec: ">=6.1.0 <7.0.0" - tailrec: ">=6.1.0 <7.0.0"
- transformers: ">=6.0.0 <7.0.0" - transformers: ">=6.0.0 <7.0.0"
- typelevel-prelude: ">=7.0.0 <8.0.0" - typelevel-prelude: ">=7.0.0 <8.0.0"
- unlift: ">=1.0.1 <2.0.0"
- unsafe-coerce: ">=6.0.0 <7.0.0" - unsafe-coerce: ">=6.0.0 <7.0.0"
test: test:
main: Test.Main main: Test.Main

View File

@ -25,7 +25,6 @@ import Effect.Aff (Canceler(..), makeAff)
import Effect.Aff.Class (class MonadAff, liftAff) import Effect.Aff.Class (class MonadAff, liftAff)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
import Effect.Exception (error) import Effect.Exception (error)
import Effect.Timer (setTimeout)
import Effect.Uncurried (mkEffectFn1) import Effect.Uncurried (mkEffectFn1)
import Foreign (Foreign, unsafeToForeign) import Foreign (Foreign, unsafeToForeign)
import Foreign.Object (Object) import Foreign.Object (Object)
@ -124,7 +123,6 @@ foreach stream cb = do
liftAff $ makeAff \res -> do liftAff $ makeAff \res -> do
removeDataListener <- flip (Event.on dataH) stream \row -> removeDataListener <- flip (Event.on dataH) stream \row ->
void void
$ setTimeout 0
$ flip catchError (res <<< Left) $ flip catchError (res <<< Left)
$ do $ do
cols <- liftMaybe (error "unreachable") =<< getOrInitColumnsMap stream cols <- liftMaybe (error "unreachable") =<< getOrInitColumnsMap stream