halayli / lthread

lthread, a multicore enabled coroutine library written in C
Other
813 stars 82 forks source link

lthread_poll assertion error #40

Open jkarneges opened 9 years ago

jkarneges commented 9 years ago

I'm getting this assertion error: lthread/src/lthread_sched.c:252: lthread_run: Assertion `lt_write != ((void )0) || lt_read != ((void )0)' failed.

Trying this with some basic code:

pollfd p;
memset(&p, 0, sizeof(p));
p.fd = fd;
p.events = POLLIN;
lthread_poll(&p, 1, 1000000);

If I substitute these lines of code for:

lthread_wait_read(fd, 0);

Then it waits just fine.