Skip to content

Commit

Permalink
fixup! Implement and use HibernationManagerImpl
Browse files Browse the repository at this point in the history
  • Loading branch information
MellowYarker committed Mar 22, 2023
1 parent 4a0228b commit 9d80560
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/workerd/io/hibernation-manager.c++
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,10 @@ kj::Promise<void> HibernationManagerImpl::readLoop(HibernatableWebSocket& hib) {
package = { .currentOccupant = hib, .e = nullptr };

// TODO(now): Within CustomEvent impl run, when we pass a reference to this hibernation manager,
// we'll want to assign the hib manager ref to the Worker::Actorso that JS can access it elsewhere.
// we'll want to assign the hib manager ref to the Worker::Actor so that JS can access it elsewhere.
if (hib.activeWebSocket == nullptr) {
// If we are currently hibernating, we need to wake up.
// TODO(soon): Ping/Pongs that don't wake us from hibernation.
// TODO(now): We need to get access to an Isolate so we can deserialize `attachment` and
// pass a jsg::Lock& to unhibernate.
// TODO(now): We can't create the api::WebSocket at this point since we aren't guaranteed to
// have an Isolate. We should create and assign the `activeWebSocket` when running inside the
// CustomEvent instead.
}

return readLoop(hib);
Expand Down

0 comments on commit 9d80560

Please sign in to comment.