concurrency problem with pointers

Sean Kelly sean at invisibleduck.org
Thu Jul 18 16:36:24 PDT 2013


On Jul 18, 2013, at 8:29 AM, evilrat <evilrat666 at gmail.com> wrote:
> 
> shortly speaking, WINDOW is pointer to window in C library so it's "shared", and i need it in another thread to make opengl context current in that thread, but compiler simply doesn't allow me to do anything with that, and i can't change definition since it's 3rd party bindings. any suggestions?

In short, you're trying to send a pointer via std.concurrency.  The easiest way is to cast it to/from shared.  Otherwise, you'd need to make it an opaque type like a size_t rather than a type D can tell is a reference.


More information about the Digitalmars-d-learn mailing list