Weeell, I had unit tests running without hiccup on a wide range of 
devices, and only a year later some of them started to fail with a 
seemingly "leaked" (non-restored) namespace. The question here and the 
suggested issue then introduced me to the "wedged"  M0 thread.  It works 
until it doesn't.                   
On Sunday, October 1, 2023 at 8:37:08 AM UTC+2 Kurtis Rader wrote:

> On Sat, Sep 30, 2023 at 12:23 AM TheDiveO <harald....@gmx.net> wrote:
>
>> Did you explicitly lock the initial OS thread, aka M0, to the 
>> main/initial go routine by calling runtime.LockOSThread() from main or an 
>> init func? I suspect you were lucky in the past, but I might be wrong.
>>
>
> No, I did not explicitly lock the initial thread using 
> runtime.LockOSThread(). However, I have run the program hundreds of 
> times, and for tens of hours, while working on it and not once, before 
> introducing signal.NotifyContext()did I see an instance of the gocv 
> package complaining about the thread it was running on not being the main 
> thread. It is certainly possible I have simply been lucky but that seems 
> unlikely since it fails every single time I run it when using 
> signal.NotifyContext().
>
> -- 
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/43bd9897-222a-4c7e-8431-bf015b7ed5a9n%40googlegroups.com.

Reply via email to