Here is a summary of the changes:
- This release fixes several issues for multi-threaded scripts. I'm
doing a lot of data crunching and forking off a lot of Sleep
threads. I encountered some issues and made updates to fix them.
These fixes have been in place for months and are working for me, so
I assume they'll work for you too.
- You can now use the in operator to check if a key is contained in a
hash in a read-only way. If you're sharing hashes amongst multiple
threads (properly protected with semaphores or for read-only
purposes, right?) then I recommend using the in operator to test if a
key is in a hash. Trying to retrieve a non-existent key will update
the hash on you making an innocent read into a write operation.
- I've added a sum function to compute the sum of an array (or the
sum of the products of multiple arrays).
- I've added -isupper and -islower predicates for testing if a string
is upper or lowercase. I have no idea how we went so long without this.
- Updated values(%hash, @("key1", "key2", ...)) to accept an array
parameter that specifies the keys to extract.
- I've also updated the HTML documentation to fix some minor errata,
note hash pitfalls, and provide tips on how to share closures amongst
multiple threads without deadlocking your program. See "Hash
Pitfalls" in Chapter 3 and "Avoiding closure deadlock between
threads" in Chapter 8. I also made a safety recommendation at the
end of "Sharing Functions and Bridges" in Chapter 9.
As usual you can get the release at http://sleep.dashnine.org/
-- Raphael