You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to port our network application from kernel's epoll to fstack's implementation.
I compiled hello world application from f-stack sources and it works perfectly. Next step, I incorporated appropriate f-stack's calls to my code (instead of kernel's epoll/socket/...). Here I call ff_init + ff_run in one place but I can't place my logic to ff_run callback. I tried to add sleeps to ff_run's loop and poll f-stack's sockets from another thread (I see ff_pthread_create and set TLS current thread value to my thread) - but it doesn't work. I get no data from f-socket's epoll called in my thread. What I do wrong way? Is it possible to read epoll data from another single thread (f-stack's thread which run ff_run callback will just sleep in this case and my thread will be single reader from sockets)?
Speaking more general way, what is the threading model for F-Stack? I see notes about ff_* functions to be called from business logic threads and these threads are separated from stack's ones. But what ff_pthread_create function does? Why it just copy current thread pointer to TLS variable? Why not just use static variable? If F-Stack is a single-threaded application/stack, is it possible to provide existing thread to f-stack?
--Sergey
The text was updated successfully, but these errors were encountered:
Hello,
I'm trying to port our network application from kernel's epoll to fstack's implementation.
I compiled hello world application from f-stack sources and it works perfectly. Next step, I incorporated appropriate f-stack's calls to my code (instead of kernel's epoll/socket/...). Here I call ff_init + ff_run in one place but I can't place my logic to ff_run callback. I tried to add sleeps to ff_run's loop and poll f-stack's sockets from another thread (I see ff_pthread_create and set TLS current thread value to my thread) - but it doesn't work. I get no data from f-socket's epoll called in my thread. What I do wrong way? Is it possible to read epoll data from another single thread (f-stack's thread which run ff_run callback will just sleep in this case and my thread will be single reader from sockets)?
Speaking more general way, what is the threading model for F-Stack? I see notes about ff_* functions to be called from business logic threads and these threads are separated from stack's ones. But what ff_pthread_create function does? Why it just copy current thread pointer to TLS variable? Why not just use static variable? If F-Stack is a single-threaded application/stack, is it possible to provide existing thread to f-stack?
--Sergey
The text was updated successfully, but these errors were encountered: