Re: Message Strobe OOT block - problem with threads

2021-07-09 Thread isaac mario tupac davila
Hi Marcus I first deleted the interrupt in the stop() method but it didn't work. After that, I read your link and it gave me an idea. I put a try-catch in the boost::this_thread::sleep function to discover what interruption is happening, and now, my program works as it should be and no kind of int

Re: Message Strobe OOT block - problem with threads

2021-07-09 Thread Marcus Müller
Well, then behaviour is as intended: https://www.boost.org/doc/libs/1_54_0/doc/html/thread/thread_management.html#thread.thread_management.tutorial.interruption I think you simply might not want to interrupt() the thread here? Best regards, Marcus On 09.07.21 19:35, isaac mario tupac davila wro

Re: Message Strobe OOT block - problem with threads

2021-07-09 Thread isaac mario tupac davila
Hi Marcus I'm setting d_finished = true in the stop() function, like GNU Radio message strobe do it: bool thread_ptr_impl::stop() { // Shut down the thread d_finished = true; d_thread->interrupt(); d_thread->join(); return block::stop(); } El vie, 9 ju

Re: Message Strobe OOT block - problem with threads

2021-07-09 Thread Marcus Müller
Hi Isaac, where do you set `d_finished = true;`? On 09.07.21 19:04, isaac mario tupac davila wrote: > Hello > > My name is Isaac . I'm trying to do a message strobe OOT block which could > read a .txt > file to define a list of command messages. I created a general block and > deleted the > gen

Message Strobe OOT block - problem with threads

2021-07-09 Thread isaac mario tupac davila
Hello My name is Isaac . I'm trying to do a message strobe OOT block which could read a .txt file to define a list of command messages. I created a general block and deleted the general_work class as messages work in a separate thread. I literally write the same idea of the message strobe block p