Commit a73a2dd
committed
Make pool self-contained, remove verbose logging, add MemoryPools
This change was supposed to be pretty minor, but it required larger changes
to the rest of the project.
The goal was to remove the verbose logging while testing (because the new
Http Client does a bit of fuzzing, so this is called _a lot_ more) AND to make
the loop self-contained, so that callers didn't have to call the onRecv, onSend
and onConnect callbacks (to decrement the `events_nb`).
-- Unexpected breaking change #1 --
I also decided to add a MemoryPool for the IO.Completion used by timeout and
cancel, as well as a MemoryPool for the ContextTimeout and ContextCancel. This
caused a build failure due to an internal dependency loop. The issue is that
the interfaces check requires the Loop, but I made the Loop-type dependent on
the JsCallback (because it now has a MemoryPool(ContextTimeout) field which has
a JsCallback. But JsCallback isn't available until the interfaces check passes!
-- Unexpected breaking change #2 --
More minor, but I removed the `unrechable` from the code and made the functions
return an error. I think we should avoid having runtime-unreachable as much as
possible.
-- Unknown change #1 --
Not clear if the inner IO loop had to be a pointer (`io: *IO`), but I changed it
to `io: IO`, and everything seems to work.1 parent 8a357a8 commit a73a2dd
File tree
5 files changed
+121
-387
lines changed- src
- engines/v8
- tests
5 files changed
+121
-387
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 122 | | |
128 | 123 | | |
129 | 124 | | |
| |||
This file was deleted.
0 commit comments