Comments (6)
ping @Abscissa this may be something you've experienced.
from eventcore.
Hm... I take it back, it actually gets freed synchronously, but BEFORE the final GC. So it's guaranteed to segfault.
Like I said, I'm not sure exactly how to solve it. Perhaps you can check if any sockets/contexts are open, and if so, don't free it (and use C malloc to allocate the driver).
from eventcore.
I'm going to work on a potential PR to fix this. I think it actually can be done without leaving any lingering resources -- you just have to defer destruction of the class until all the resources are released. Still have to allocate on the C heap though.
from eventcore.
OMG, I just realized, this was fixed by @s-ludwig 11 days ago in #87. I've been looking at my local download of eventcore debugging this. So hey, thanks for fixing it before I even discovered it, that's some service! 😜
from eventcore.
BTW, for the PR I was going to write, I had conceived of having the release resources function calling dispose
automatically if dispose was already requested, but delayed due to still having open FDs. You'd just need a callback of some kind in the drivers that need it.
from eventcore.
I was originally going to implement it that way, too, but figured that since the application is usually shut down anyway, and the case where just a thread is shut down is more difficult to support correctly, it was better to just emit a warning and leave the OS clean up the rest. Emitting a warning and shutting down the driver lazily would of course have been better, but the gain/effort ratio currently was just not high enough for me.
from eventcore.
Related Issues (20)
- Is EINTR handled on POSIX? HOT 1
- Release v0.8.49 broke dlang's Buildkite CI HOT 2
- What's the validation counter used for?
- dub produces error on FreeBSD 12.1-RELEASE-p10 HOT 2
- code duplication within version block below. HOT 2
- Do not call `AA.remove` from finalizer HOT 4
- Timer callback resets on every firing and should be rearmed to continue HOT 1
- What EventDrive* should I use to react to WinAPI gui messages? HOT 8
- Use io_uring where sensible HOT 1
- Possible s_driver leaking path HOT 4
- Creating and waiting on timers causes GC allocation every time - expected?
- Issue with installing vibe.d on android for termux HOT 2
- Implement support for DNS resolution via `org.freedesktop.resolve1`
- Building eventcore failing on FreeBSD 13.0-RELEASE
- waitForData is not implemented for Windows
- About io_uring support ;)
- Support scatter write / gather read HOT 1
- WinAPIEventDriverSockets.cancelRead closes connection
- MsgWaitForMultipleObjectsEx wake mask HOT 2
- TaggedUnion assert failure when waiting an event from a different thread HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eventcore.