seanpburke / nifty Goto Github PK
View Code? Open in Web Editor NEWANSI C pthread packages for thread pools, queues/channels, task timers, set operations, red-black btree associative map.
License: MIT License
ANSI C pthread packages for thread pools, queues/channels, task timers, set operations, red-black btree associative map.
License: MIT License
I'm not sure if this is still being maintained, but I have some code that was using an older version of nft_queue and wanted to try upgrading to this version since you've now built in the reference counting (thank you!).
However, after converting to this new version, I have determined with 100% certainty that there is a resource leak if this condition happens:
nft_queue_shutdown(q, 0)
when there is an item waiting in the queue.nft_queue_pop_wait(q,0)
on the queue until it is drained (returns NULL). I believe this is what the documentation says you need to do in order to get the queue to shut down.I see exactly why this is happening -- in the nft_queue_shutdown(...)
code you release the original creation reference count if and only if the queue is empty. What you don't do upon popping items from the queue and the queue becoming empty to see if it is in shutdown and also releasing the extra count.
I have a fix for this which I'll push up to github momentarily and open a pull request.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.