SimpleEventBuilder/testing/is_epoll_really_thsafe
MasterRoby3 583d6fdae0 Backup added 2023-09-03 21:20:58 +02:00
..
ev_builder.out Fully implemented multi_th test and got test results 2023-08-27 21:40:36 +02:00
event_builder_epoll.cxx Fully implemented multi_th test and got test results 2023-08-27 21:40:36 +02:00
exec_order_test.sh Backup added 2023-09-03 21:20:58 +02:00
prov.out Fully implemented multi_th test and got test results 2023-08-27 21:40:36 +02:00
provider.cxx Fully implemented multi_th test and got test results 2023-08-27 21:40:36 +02:00
readme.md Fixed readme and added full event format 2023-08-29 01:11:38 +02:00
res.txt Fully implemented multi_th test and got test results 2023-08-27 21:40:36 +02:00

readme.md

Is epoll really thread safe?

Motivation

Scope of this test is simply to verify that TCP communication with epoll doesen't mix data. In particular, it's important to verify that if one big chunk is sent, the TCP protocol doesen't split it into different events for level triggered epoll (ofc it's gonna be splitted due to buf size).

The important thing is that if I send 1MB of data, it doesen't wake up 2 threads listening to the same fd just because TCP split the package (afaik that shouln't happen, but it's always better to verify, since epoll() is fundamentally broken).

Tested on sending buffer of size 1000 (receiving size 8 2 threads) with simulation re-executed 1000 times -> no reordering. This approach should then be considered safe and used in the project.