Tcl Library Source Code

Check-in [8022922366]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2018 Conference, Houston/TX, US, Oct 15-19
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Aug 20.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix to prevent oroburus loops in cron
Timelines: family | ancestors | descendants | both | hypnotoad
Files: files | file ages | folders
SHA3-256:80229223660742fc2c609a30b7e4d4b8b181779f8eec7d7bb395342cccbef8e0
User & Date: hypnotoad 2018-07-12 13:16:49
Context
2018-07-13
14:53
Fixed the meta markup on the clay module. Moved the definition of clay::object into the metaclass.tcl file. This allows practcl to just steal the proc.tcl, class.tcl, and object.tcl files from this module to include on its own, without needing to ALSO include oo::dialect. Renamed the "source" ensemble method to "provenace" and added a new "source" which sources a file inside the object's namespace. Practcl now utilizes a minimalist snippet of the clay project, replacing its own implementation with the clay implementation. check-in: 39bd8c6989 user: hypnotoad tags: hypnotoad
2018-07-12
13:16
Fix to prevent oroburus loops in cron check-in: 8022922366 user: hypnotoad tags: hypnotoad
2018-07-11
23:40
Officially adding clay as a module for installation check-in: 2b68c1fb87 user: hypnotoad tags: hypnotoad
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/cron/cron.tcl.

262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
}

proc ::cron::once_in_a_while body {
  set script {set _eventid_ $::cron::current_event}
  append script $body
  # Add a safety to allow this while to only execute once per call
  append script {if {$_eventid_==$::cron::current_event} yield}
  uplevel 1 [list while 1 $body]
}

proc ::cron::sleep ms {
  if {$::cron::trace > 1} {
    puts [list ::cron::sleep $ms [info coroutine]]
  }








|







262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
}

proc ::cron::once_in_a_while body {
  set script {set _eventid_ $::cron::current_event}
  append script $body
  # Add a safety to allow this while to only execute once per call
  append script {if {$_eventid_==$::cron::current_event} yield}
  uplevel 1 [list while 1 $script]
}

proc ::cron::sleep ms {
  if {$::cron::trace > 1} {
    puts [list ::cron::sleep $ms [info coroutine]]
  }