Tcl Library Source Code

Check-in [5e257ddf79]
Login

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

Overview
Comment:Tkt [fdf6afed94] done. Merged tkt-fdf6afed94, full tests passing.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5e257ddf7920d1a03682fba68655a3fd666de8d0a73ae0209cd0551082f7151f
User & Date: aku 2019-02-21 23:32:13.394
References
2019-02-21
23:33 Closed ticket [fdf6afed94]: cache::async error when calling the clear method - Attached BugFix plus 5 other changes artifact: 9d2ed3042e user: aku
Context
2019-02-22
00:54
Added Roy Keene's new package, 'lazyset' (determine a value on 1st read of a variable) check-in: 49fdc19548 user: aku tags: trunk
2019-02-21
23:32
Tkt [fdf6afed94] done. Merged tkt-fdf6afed94, full tests passing. check-in: 5e257ddf79 user: aku tags: trunk
21:30
Merged png-get-physical-dimension, full tests passing. check-in: ee79783f52 user: aku tags: trunk
2019-02-20
05:39
Test fixes in assorted modules - hook: Updated to match changes in 8.6+ core error stack results. - html: Undone bad removal of some trailing whitespace. - markdown: Fixed bad name of untabify2 function, and fixed result postprocessing in tests. - math::pca is Tcl 8.6+ - string::token::shell: Updated to match result variation starting with 8.6. check-in: e6742077ec user: aku tags: trunk
2018-12-15
00:18
Applied submitted patches to fix ticket [fdf6afed94]. Closed-Leaf check-in: e01af4e06f user: andrewm tags: tkt-fdf6afed94
Changes
Unified Diff Ignore Whitespace Patch
Changes to modules/cache/ChangeLog.








1
2
3
4
5
6
7








2013-02-01  Andreas Kupries  <[email protected]>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2011-12-13  Andreas Kupries  <[email protected]>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2018-08-28  Aldo Buratti

    *
    * BugFix in method 'clear'
        * Added a test in async.test
    * Release 0.3.1
    *

2013-02-01  Andreas Kupries  <[email protected]>

	*
	* Released and tagged Tcllib 1.15 ========================
	* 

2011-12-13  Andreas Kupries  <[email protected]>
Changes to modules/cache/async.man.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

[manpage_begin cache::async n 0.3]
[keywords asynchronous]
[keywords cache]
[keywords callback]
[keywords synchronous]
[copyright {2008 Andreas Kupries <[email protected]>}]
[moddesc   {In-memory caches}]
[titledesc {Asynchronous in-memory cache}]
[require Tcl 8.4]
[require cache::async [opt 0.3]]
[description]

This package provides objects which cache data in memory, and operate
asynchronously with regard to request and responses. The objects are
agnostic with regard to cache keys and values, and unknown methods are
delegated to the provider of cached data. These two properties make it
easy to use caches as a facade for any data provider.
>
|








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[vset Version 0.3.1]
[manpage_begin cache::async n [vset Version]]
[keywords asynchronous]
[keywords cache]
[keywords callback]
[keywords synchronous]
[copyright {2008 Andreas Kupries <[email protected]>}]
[moddesc   {In-memory caches}]
[titledesc {Asynchronous in-memory cache}]
[require Tcl 8.4]
[require cache::async [opt [vset Version]]]
[description]

This package provides objects which cache data in memory, and operate
asynchronously with regard to request and responses. The objects are
agnostic with regard to cache keys and values, and unknown methods are
delegated to the provider of cached data. These two properties make it
easy to use caches as a facade for any data provider.
Changes to modules/cache/async.tcl.
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
	# not present the state will not change, and queries in flight
	# simply refill the cache as they would do anyway without the
	# 'clear'.

	if {![llength $args]} {
	    array unset myhit  *
	    array unset mymiss *
	} elseif {[llength $arg] == 1} {
	    set key [lindex $args 0]
	    unset -nocomplain  myhit($key)
	    unset -nocomplain mymiss($key)
	} else {
	    WrongArgs ?key?
	}
	return







|







78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
	# not present the state will not change, and queries in flight
	# simply refill the cache as they would do anyway without the
	# 'clear'.

	if {![llength $args]} {
	    array unset myhit  *
	    array unset mymiss *
	} elseif {[llength $args] == 1} {
	    set key [lindex $args 0]
	    unset -nocomplain  myhit($key)
	    unset -nocomplain mymiss($key)
	} else {
	    WrongArgs ?key?
	}
	return
178
179
180
181
182
183
184
185

    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide cache::async 0.3







|
178
179
180
181
182
183
184
185

    # ### ### ### ######### ######### #########
}

# ### ### ### ######### ######### #########
## Ready

package provide cache::async 0.3.1
Changes to modules/cache/async.test.
221
222
223
224
225
226
227





























228
229
230
} -cleanup {
    ca destroy
} -result {BEGIN
WAIT
DATA_HOLE get KEY ::ca
DONE {unset KEY}
RESUME}






























# -------------------------------------------------------------------------
testsuiteCleanup







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
} -cleanup {
    ca destroy
} -result {BEGIN
WAIT
DATA_HOLE get KEY ::ca
DONE {unset KEY}
RESUME}

# -- $obj clear ---------------------------------------------------------------

test cache-async-6.0 {clear a not existing value} -setup {
    cache::async ca DATA_NONE
    res!
} -body {
    res+ BEGIN
    ca clear KEY
    res+ END
    res?lines
} -cleanup {
    ca destroy
} -result {BEGIN
END}

test cache-async-6.1 {clear an existing value} -setup {
    cache::async ca DATA_NONE
    ca set KEY VALUE
    res!
} -body {
    res+ BEGIN
    ca clear KEY
    res+ END
    res?lines
} -cleanup {
    ca destroy
} -result {BEGIN
END}

# -------------------------------------------------------------------------
testsuiteCleanup
Changes to modules/cache/pkgIndex.tcl.
1
2
3
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded cache::async 0.3 [list source [file join $dir async.tcl]]


|

1
2
3
if {![package vsatisfies [package provide Tcl] 8.4]} {return}
package ifneeded cache::async 0.3.1 [list source [file join $dir async.tcl]]

Changes to modules/hook/hook.test.