Sleep 2.1 - update 4

10 views
Skip to first unread message

Raphael Mudge

unread,
Apr 30, 2009, 12:24:35 AM4/30/09
to sleep-de...@googlegroups.com
Hello everyone,
Tonight I've released Sleep 2.1-u4. This release is mostly fixes
that have accumulated over the past several months. Sleep is seeing
a lot of use on my end powering the backend for http://
www.afterthedeadline.com.

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

Poarman

unread,
Apr 30, 2009, 3:58:21 PM4/30/09
to Sleep Developers
Awesome Raph! Thanx for the update) overloaded in especially)
although i am sure i will use the other capabilities as well at some
time or other.
Reply all
Reply to author
Forward
0 new messages