Andreu Botella (they/them)
Andreu Botella (they/them)
DDeno
Created by kakashi_69_xd on 4/22/2024 in #help
Finalization not working
the closest you can have is the using proposal (currently stage 3)
8 replies
DDeno
Created by kakashi_69_xd on 4/22/2024 in #help
Finalization not working
in JS there's no way to have a destructor that accesses the object
8 replies
DDeno
Created by kakashi_69_xd on 4/22/2024 in #help
Finalization not working
which means there is no point at which there are no remaining references
8 replies
DDeno
Created by kakashi_69_xd on 4/22/2024 in #help
Finalization not working
I think () => this.drop() is actually keeping a reference to this alive
8 replies
DDeno
Created by kakashi_69_xd on 4/22/2024 in #help
Finalization not working
which means at that point there can't be any remaining references to the GC'd object
8 replies
DDeno
Created by kakashi_69_xd on 4/22/2024 in #help
Finalization not working
FinalizationRegistry only calls the callback after the object is GC'd
8 replies
DDeno
Created by jcayzac on 11/15/2023 in #help
Most efficient way to broadcast messages globally across main script and workers?
I think
20 replies
DDeno
Created by jcayzac on 11/15/2023 in #help
Most efficient way to broadcast messages globally across main script and workers?
technically it works much like postMessage and MessagePort, except deno knows all of the BroadcastChannels in existence
20 replies
DDeno
Created by jcayzac on 11/15/2023 in #help
Most efficient way to broadcast messages globally across main script and workers?
and you might want multiple different channels, for different things, so you give them different names
20 replies
DDeno
Created by jcayzac on 11/15/2023 in #help
Most efficient way to broadcast messages globally across main script and workers?
like, you log in on one tab and it notifies every other tab so it shows you as logged in without having to refresh
20 replies
DDeno
Created by jcayzac on 11/15/2023 in #help
Most efficient way to broadcast messages globally across main script and workers?
the initial use case in the browser was to let every tab from a same origin do multiple publisher multiple consumer communication
20 replies
DDeno
Created by jcayzac on 11/15/2023 in #help
Most efficient way to broadcast messages globally across main script and workers?
even if they're created from different workers
20 replies
DDeno
Created by jcayzac on 11/15/2023 in #help
Most efficient way to broadcast messages globally across main script and workers?
no, if you create multiple broadcastchannels with the same string passed to the constructor, they get linked together
20 replies
DDeno
Created by jcayzac on 11/15/2023 in #help
Most efficient way to broadcast messages globally across main script and workers?
--unstable
20 replies
DDeno
Created by jcayzac on 11/15/2023 in #help
Most efficient way to broadcast messages globally across main script and workers?
BroadcastChannel could work
20 replies
DDeno
Created by alexp95 on 11/2/2023 in #help
Cannot pass request object to worker
if you need to do some heavy computation in response to a request, you should instead extract the data in some form in the main thread (even if that's just doing req.arrayBuffer() or similar) and sending that
3 replies
DDeno
Created by alexp95 on 11/2/2023 in #help
Cannot pass request object to worker
it's not possible to do that
3 replies