Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e0d3d2d8d56b213f2ae0571f2288f85435cb89becf4e8d4208d783530e557d68
Ticket: 570cb6afea12bc135f6c78afc0abae53a1918438
Not getting expected outut.
User & Date: sebres on 2021-01-06 18:37:53
Changes

  1. closedate changed to: "2459221.27631346"
  2. closer changed to: "sebres"
  3. icomment:
    <blockquote><i>> I have configured the TCL with -enable_thread flag and run below TCL commands.</i></blockquote>
    
    option "-enable_thread" (as well as threads themselves) has nothing to do with an event cycle (you handle quasi single-threaded here), this option just allows to use threads in tcl at all (e. g. thread module or some system threads, so the library is usable with threads).
    
    Also don't confuse tcl with other langs using GIL (for example with python), every tcl interpreter belong to exactly one main thread, whom is allowed to execute code in this interpreter. There are few exceptions in tcl world, which could act across the threads or are shared between the workers.
    
    Event cycle is to consider single-threaded (basically this is true in every language).
    
    <blockquote><i>> should it be hang or not ?</i></blockquote>
    
    yes, this is fully expected behavior, because as already said <code>after 700</code> does just a sleep for current thread, the events are not executed at all; read [https://www.tcl.tk/man/tcl8.6/TclCmd/after.htm|documentation] or [https://wiki.tcl-lang.org/page/Tcl+event+loop|wiki :: Tcl event loop] for more info.
    
    Regarding the threads, you may take a look at [https://www.tcl.tk/man/tcl8.6/ThreadCmd/contents.htm|thread package].
    
  4. login: "sebres"
  5. mimetype: "text/x-fossil-wiki"
  6. status changed to: "Closed"