|
Boost Users : |
From: Alexander Carôt (alexander_carot_at_[hidden])
Date: 2022-12-28 13:55:16
Hello all,
I have a classical receive handling structure for an asynchronous UDP socket:
void receiver::receive(){
mySocket->async_receive_from(
boost::asio::buffer(input, maxInputLength), senderEndpoint,
boost::bind(&receiver::handleReceiveFrom, this,
boost::asio::placeholders::error,
boost::asio::placeholders::bytes_transferred));
}
void receiver::handleReceiveFrom(const boost::system::error_code &error,
size_t bytes_recvd) {
// SPECIFIC CODE HERE AND FINAK CALL OF RECEIVE FUNCTION
this->receive();
}
Besides this my app works with several realtime threads I have assigned maximum priority to via:
pthread_t threadID = (pthread_t) sendThread.native_handle();
struct sched_param param;
int policy = SCHED_FIFO;
int max = sched_get_priority_max(policy);
param.sched_priority = max;
pthread_setschedparam(threadID, policy, ¶m);
Now I wonder in how far these realtime threads can have an impact on the performance of my receiver process: So far I assumed that the receiver handle code is executed immediately when a packet arrives at the NIC but I am not sure if other realtime threads might possibly delay this process when scheduled first.
In other words: If we think of the receiver handling process as a thread that is triggered by incoming packets does this thread also have realtime capabilities that can suffer from competing processes ?
Thanks in advance for clarification,
best
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net