handle exceptions in Lwt.map if the thread is already terminated

Ignore-this: 287702134697641acfd8148239c45b5c

Lwt.map already breaks tail-recursion so there is no reason not to
catch exceptions and wrap them into a thread.

Thanks to Daniel Bünzli for the remark.

darcs-hash:20120518081547-c41ad-7ce7dd72e3e54bba943b160dc6859f272357d1ae.gz
change the way the master lock is handled in libev stubs

Ignore-this: c6183dc897324d1a6065bf163d20e02b

Instead of checking in each libev callback whether the runtime system
must be re-acquired, we tell libev not to invoke pending callbacks and
we execute them ourself outside the blocking section.

darcs-hash:20120614083110-c41ad-9c5f76a7874ecc855bceec4355a40b4303383314.gz
add -package compiler-libs.toplevel for simple-top when ocaml >= 4

Ignore-this: 6fb9f7bc9a0e05b7649ccb7214108c5a

darcs-hash:20120615124511-c41ad-7a835a1a5e918ed132c77fbf827164d4d3315dd8.gz
Fix windows version of lwt_unix_read_job

Ignore-this: a6f5828529558341c2813f47e2eca15e

darcs-hash:20120620095616-71cd9-04afcb28a8b3d4084686e50d39780db31f7d738e.gz
remove extra casts in C stubs

Ignore-this: 141ad50ecda6baffee4756bcc8dfbb8c

darcs-hash:20120703004614-c41ad-6ba2e326b8172c2b7515623b8e3a49460d6e0a2e.gz
check for availability of get{serv,port}..._r functions

Ignore-this: 94d8719b92beaef2a89443732b3e91cb

darcs-hash:20120707135838-c41ad-76333d6ef8df978251c680279177c561a023603a.gz
avoid duplicating lines in setup.data

Ignore-this: 9ae45d7d89f515ec890077534a25513

darcs-hash:20120707141116-c41ad-0d4e4a86253f189c5f1bbab0376edede246fda1e.gz
do not use camlp4 for the core library

Ignore-this: ffd92d8b8923171bce9d728c612fcc92

darcs-hash:20120711123144-c41ad-df3d3588fa3a66ec438c85692e884be06f1274c6.gz
refactoring of core lib

Ignore-this: 16e7218dcb90a04688bd9c99ac4bebb5

- remove all "open"
- use Lwt.map instead Lwt.bind when possible
- use constant threads for "return ()", "return None", ...
- do not create a new thread when the same one already exists

darcs-hash:20120712111342-c41ad-15cd01bedff704982877e69da1f420bbaa889bfa.gz
add Lwt_stream.from_direct for stream with a non-lwt from function

Ignore-this: 7289929f9a1b51730232bd362e59eaf1

darcs-hash:20120712112110-c41ad-3aa2fb08d7972a4e7bfbf9c966cf3cfb5d30b924.gz
add the type Lwt.result to wakeup a thread with either a value or an exception

Ignore-this: 3403f4f44d0f42200f43c4f3e9ecfee1

darcs-hash:20120712114806-c41ad-4d7bfed9f70120e39301a19401f9e38e52e06a48.gz
do not use camlp4 in lwt.react

Ignore-this: bf513d5064114866bae4baf950bc52e6

darcs-hash:20120712114815-c41ad-19b8e6c72bf3114ec70b915e4148125b7c44ab35.gz
Fix getaddrinfo return value (addresses were returned in reverse order)

Ignore-this: b9669c69c5e463c3d460d9c16d126d86

darcs-hash:20120712164104-71cd9-9e04e528992e219cd85565dd2fe8137b6ee00cc1.gz
lwt.ml: initialize the random state lazily (to take advantage of Js_of_ocaml dead code elimination)

Ignore-this: 55278787bfe0d0487cb780d428ec9870

darcs-hash:20120713145337-71cd9-595b574ec8aa7bf67e34cdd136e74ca333c47e0b.gz
fix compilation of the toplevel with 4.00

Ignore-this: 34189bbcb5da68ea1fab0b6409d7584a

darcs-hash:20120716144947-c41ad-63ebfc571e98bf1b2d17d338a2fc003105df8e8e.gz
mark lwt.text and lwt.top as deprecated

Ignore-this: be0c136699e0095a9199194b15714d65

darcs-hash:20120716145441-c41ad-f0254d69d8844b1a99350d5a1e26d35e0507b8f2.gz
bump version number

Ignore-this: 749a5c5920c2740b33800f553e930236

darcs-hash:20120716145844-c41ad-61c6fc50cb80ba6a59eafa3eff9acf2309920fc5.gz
update CHANGES

Ignore-this: 95b92ccf90a9641719b761976b0e4ae4

darcs-hash:20120716145923-c41ad-517130cb987f0752f5963bf7ee444dabe079dcd3.gz
set the job async method to NONE in run_job_sync

Ignore-this: d9d88d531a6d4543a62bcd3ddf7836b9

If left unset, lwt_unix_free_job might try to destroy an uninitialized
mutex.

darcs-hash:20120717092711-c41ad-17b5c3b6a8a2d2114785db75d60de70da76da38a.gz
Lwt.ignore_result --> Lwt.async

Ignore-this: 733b0503c10ef9040de1f2f267278b4a

darcs-hash:20120717093403-c41ad-b90c79a0595404f374b476c3cfb3689f01b18c5f.gz