-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes for deno
compatibility
#387
Conversation
901144b
to
36e22ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be happy to land this with the suggested changes.
@@ -87,7 +87,7 @@ export function createSyncFn(workerPath, debug, callbackHandler) { | |||
} | |||
return result; | |||
}; | |||
worker.unref(); | |||
// worker.unref(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// worker.unref(); | |
if (worker.unref) worker.unref(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes -- that's a much nicer solution! :)
Nevertheless, I think, it's not enough!
The timeouts in the CI pipeline are most likely caused by hanging processes affected by this particular change resp. broken termination of workers. :(
We have to check for active event listeners or timers...
@@ -21,9 +21,12 @@ import { | |||
registerDispose, | |||
registerIncomingHttpHandler, | |||
} from "../io/worker-io.js"; | |||
import { validateHeaderName, validateHeaderValue } from "node:http"; | |||
// import { validateHeaderName, validateHeaderValue } from "node:http"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// import { validateHeaderName, validateHeaderValue } from "node:http"; | |
import * as http from "node:http"; | |
const { validateHeaderName = () => {}, validateHeaderValue = () => {} } = http; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's also a very nice improvement!
I just committed both changes, but it still needs a lot more of additional testing and rework.
3b81e72
to
04b9bff
Compare
Thanks for working on this. Let's at least land for now, we can always improve later. |
Yes -- that's a good interim solution, because the merged changes seem to do no harm to already existing use cases and test routines. I just waited, because I could isolate the non-termination issue as another Thanks for all your help! It's really a pleasure to collaborate with you! |
Just a first draft PR to feed the CI pipeline, because local testing doesn't work on my machine.
Fixes: #385
Warning! -- there are important parts missing/untested!
validateHeaderName
andvalidateHeaderValue
are temporary replaced by dummy entries.This should be better fixed on the
deno
side (see: missing reexport ofvalidateHeaderName
andvalidateHeaderValue
innode:http
denoland/deno#22614).The
worker_thread.unref()
case is still uttery unsolved and just temporary removed.