Comments (13)
from unix.
Both sys/msg.h
and mqueue.h
are on the list of "Not Supported" "Unsupported interfaces" headers in Posix.hs
. This is in contrast to several headers in the "To be supported" category, so it would appear that message wueurs are blocked for some reason other than lack of volunteers to write an interface. I'm not sure of the rationale for this, but I can look into it.
For the record, can you share a use case that might encourage adoption by the Core Libraries Committee of a patch adding message queues?
from unix.
It's a standard IPC method that differ from (named) pipes:
- They have internal structure (pipes are just about pumping bits)
- They are priority driven and the queue stays ordered so the oldest message with the highest priority is at the front.
- The programmer has control over various aspects of the queue, on creation one can set
- size of queue (number of messages)
- max size of message
- It's possible to determine that state of a queue
The use case is of course to allow writing programs in Haskell that communicate via message queues.
from unix.
Good enough for me. I'll put some feelers out on the mailing list to see I can determine why (or if) this was slated not to be implemented.
In the event that there is no compelling reason for us not to merge a patch adding this functionality, would you be willing to submit such a patch?
from unix.
Sure, I'd be willing to make an attempt at adding it.
from unix.
Thanks! I am, of course, willing to help verify/integrate, but I'm in the middle of a move and remodel at the moment and can't take the lead.
I've thrown a request for info on the libraries mailing list. Pending a response there, I see no reason not to integrate anything created. Worst case, it could be spun into a new library.
On that note, posix-realtme
provides a set of basic wrappers around mqueue.h
(realtime message queues), which may help with creating a wrapper around sys/queue.h
or even solve your challenge outright.
from unix.
mqueue.h
is Posix message queues: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/mqueue.h.html
from unix.
mqueue.h
is REALTIME (caps and bold per the spec) message queues. One Haskell binding (recently supported, albeit of "provisional" stability) to that header is provided in posix-realtime
.
What I think of as "POSIX Message Queues" is provided by sys/msg.h
. There is not currently a Haskell binding to those headers of which I am aware.
Which are you looking for? If the former, a solution exists. If the latter, a solution will need to be built. I'll keep this issue open in either case, as I'm legitimately curious why the unix
library has (potentially) chosen not to support either.
from unix.
sys/msg.h
is commonly called System V message queues (or XSI message queues).
The message queues I'm interested are the ones specified in mqueue.h
.
from unix.
Fair enough. Good luck with the bindings in posix-realtime.
Pending the mailing list, I may get in touch with Michal Gajda and see if he would like to have posix-realtime
integrated into unix
.
from unix.
Yes, is there any point in keeping them separate?
(A quick glance shows that the mqueue support in posix-realtime
aren't complete :( )
from unix.
Incompleteness would, of course, be a valid reason not to merge posix-realtime
into unix
. Other than that, or an objection by the author of posix-realtime
, I have no personal knowledge of a reason not to merge them; however, there may be a historical reason of which I'm not aware. The "Unsupported interfaces" list was created in 2002 and hasn't seen much modification, while I've only been maintaining unix
since earlier this year.
My gut feeling is that the path of least resistance would be to add the missing functionality in posix-realtime
's System.Posix.Realtime.MQueue
, add that file (and any appropriate tests) to unix
, and submit it as a pull request here on Github to both unix
and posix-realtime
. Worst case scenario, you have a usable local copy. Best case scenario it is accepted into posix-realtime
and into unix
(again, pending that historical data from the mailing list) and benefits everyone.
from unix.
My need for this has disappeared so I'm closing this.
from unix.
Related Issues (20)
- Make current maintainers explicit HOT 3
- Using on MacOS / iOS - semTrywait: invalid argument (Bad file descriptor) HOT 3
- Release Planning: unix-2.7.3 (GHC 9.4.1) HOT 4
- `GroupEntry`/`UserEntry` uses String (even in ByteString variants) HOT 3
- Reduce String/ByteString/PosixString variants HOT 5
- RELEASE 2.7.3 HOT 6
- Consider using CirrusCI for AArch64 CI? HOT 3
- System.Posix.Semaphore.semThreadWait polls unnecessarily with threaded RTS
- Remove config.sub
- Revitalise System.Posix.DynamicLinker.Module
- Consider paring down the set of output modes HOT 7
- Include GHC 9.4 in CI ? HOT 4
- System library dependencies not documented HOT 3
- Build error with wasm32-wasi: system `wasi' not recognized HOT 11
- `unix-2.8` release for GHC 9.6 HOT 4
- `System.Posix.Env.ByteString.getEnvironment` segfaults on empty environment HOT 5
- NetBSD CI broken HOT 1
- System.Posix.User stopped exporting UserEntry HOT 3
- Should `mkstemp` use `throwErrnoIfMinus1Retry` instead of `throwErrnoIfMinus1`? HOT 3
- Add CI for the JS backend
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 unix.