MEDIUM: threads/lua: Cannot acces to the socket if we try to access from another...
authorThierry FOURNIER <thierry.fournier@ozon.io>
Wed, 12 Jul 2017 10:10:44 +0000 (12:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 12:58:32 +0000 (13:58 +0100)
commit94a6bfce9b714f13dfd94c2f5df3666e2601c053
treea9df9bb52f9b2d470844d1c35f7e33553f1ef765
parent4325ab727ca4ba07a68d37bd35c464d46b7f8cdb
MEDIUM: threads/lua: Cannot acces to the socket if we try to access from another thread.

We have two y for nsuring that the data is not concurently manipulated:
 - locks
 - running task on the same thread.
locks are expensives, it is better to avoid it.

This patch cecks that the Lua task run on the same thread that
the stream associated to the coprocess.

TODO: in a next version, the error should be replaced by a yield
and thread migration request.
include/types/hlua.h
src/hlua.c