|
From: | Moses Browne Mwakyanjala |
Subject: | Re: Multithreading in GR blocks |
Date: | Mon, 13 Apr 2020 19:21:24 +0200 |
bool
TCPServer::stop()
{
m_bFinished = true;
m_ReceiveThread->join();
m_ListenThread->join();
return true;
}
Regards,
Moses.
Hi Moses,
your code doesn't show how your GNU Radio block's stop() function would
tell your TCP Server thread that it's time to shut down, so I presume
that doesn't happen – that would explain why the flow graph can't ever
shut down!
Best regards,
Marcus
On 13.04.20 18:54, Moses Browne Mwakyanjala wrote:
> Hello everyone,
> I have created a TCP/IP block by adapting the ZMQ message pub block.
> Both blocks make use of boost multithreading. The TCP/IP block is used
> by a standalone C++ program. To run the gnuradio topblock, the C++
> program calls tb->start() function. To stop the topblock, the
> functions tb->stop() and tb->wait() are called.However, the program
> "hangs" when tb->stop() is called. This suggests there is something
> wrong with the way I use boost multithreading.
> All help is appreciated.
>
> Regards,
> Moses.
[Prev in Thread] | Current Thread | [Next in Thread] |