Sujet : Re: Crash in Itcl when using Iwidgets in multiple threads
De : nospam (at) *nospam* wanadoo.nl (Schelte)
Groupes : comp.lang.tclDate : 23. Aug 2024, 15:41:27
Autres entêtes
Organisation : KPN B.V.
Message-ID : <nnd$373274b5$696c2943@65e884ea42206068>
References : 1
User-Agent : Mozilla Thunderbird
On 23/08/2024 14:29, Petro Kazmirchuk wrote:
This code runs 8 threads in parallel each showing an iwidget (pushbutton or anything else, doesn't matter) and after ~1 minute it crashes with:
Unhandled exception at 0x00007FF8846DA6E4 (itcl424t.dll) in tclsh86t.exe: 0xC0000005: Access violation reading location 0x0000000000000018.
As far as I know, Tk isn't thread safe. So your approach is fraught with danger to begin with. It would be better to have one thread for the GUI and separate threads to do the work, if needed.
Schelte.