Hi Erick,

thanks for your reply?

The spawn_sched work fine for me. You do a great job in the binding. Definitely it would be very good to have a zmq implementation in Rust but It's a lot of work and your binding seem good enough. I'll tell you if I found some problems.

best

Philippe Delrieu

Le 08/11/2013 14:38, Erick Tryzelaar a écrit :
(I maintain the bindings and this mailing list is fine for now. Bug reports work too)

Right now rust-zmq is a pretty straightforward binding of the zeromq library, and is not integrated with rust's scheduler. So it's not yet preventing the user from two tasks from deadlocking. The only safe way to deal with that is to spawn those tasks off in their own thread.

The best thing would be for us to write our own zmq implementation in rust, but that'll take quite a while to write. Or perhaps there is some way we can feed the ZMQ_FD of a socket to libuv to protect against task deadlocking.

On Friday, November 8, 2013, Philippe Delrieu wrote:

    I found the problem. Rust schedules task in the same thread. If I
    stop the thread (the recv call sleep I think), every task stop.
    So I read the doc and I see the spawn_sched method that start a
    new scheluder in a new thread.

    I replace the do spawn with do
    std::task::spawn_sched(std::task::SingleThreaded) and now it work.

    Philippe Delrieu


    _______________________________________________
    Rust-dev mailing list
    [email protected]
    https://mail.mozilla.org/listinfo/rust-dev


_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to