Coder Social home page Coder Social logo

Comments (4)

izgzhen avatar izgzhen commented on July 29, 2024

Oh, this is still not working. I got bus error when trying to run examples/simple.rs

from coroutine-rs.

zonyitoo avatar zonyitoo commented on July 29, 2024

No, you can't. You should use Box::into_raw(wrapper) as *const _ as *mut libc::c_void

from coroutine-rs.

izgzhen avatar izgzhen commented on July 29, 2024

Not working, it doesn't typecheck :(

src/asymmetric.rs:271:71: 271:78 error: mismatched types:
 expected `Box<_>`,
    found `[closure@src/asymmetric.rs:220:23: 269:10 puller_ref:_, f:_, coro_ref:_]`
(expected box,
    found closure) [E0308]
src/asymmetric.rs:271         coro.context.init_with(coroutine_initialize, 0, Box::into_raw(wrapper) as *const _ as *mut libc::c_void, &mut stack);

Or if I first box it then Box::into_raw, it will still lead to runtime error

from coroutine-rs.

zonyitoo avatar zonyitoo commented on July 29, 2024

Please refer to this one: https://github.com/zonyitoo/context-rs/blob/master/examples/asymmetric.rs

They should be almost the same. I am extremely busy these days so I am not going to fix this lately.

from coroutine-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.