Closed cejkato2 closed 4 years ago
It isn't used in any of our modules. Simple search for multi_recv
over all our NEMEA-related repositories reveals that the only place it's used is a test script under libtrap/tests
.
Unfortunately, multi_recv
is also usable via trap_get_data()
that accepts so called ifc_mask
. Therefore, removing multi_recv
feature means deleting trap_get_data()
as well (its API would not make sense without ifc_mask
- 32b mask vs 16b ifc_idx
).
It is worth noting that trap_get_data()
has been marked deprecated for very long time...
It was substituted by trap_recv()
.
The multi_recv function aimed to provide a simple API to get a list of messages among multiple interfaces. Due to low flexibility, NEMEA modules probably handle receiving from multiple interfaces on their own (using own threads or openmp etc.). Since there are "reader" threads in libtrap internals that are created during initialization, it is a useless resource consumption when the feature is not used - is it really unused in all modules? How can we find out that there is no NEMEA module that uses multi_recv?
It was proposed by @janskto1 to drop this feature from the libtrap API.
I generally agree because it will clean up code a bit. Any comments?