dbuenzli / logs

Logging infrastructure for OCaml
http://erratique.ch/software/logs
ISC License
87 stars 19 forks source link

Add support for threads 2 #28

Closed Julow closed 5 years ago

Julow commented 5 years ago

Alternative to https://github.com/dbuenzli/logs/pull/27.

Add a logs.threaded library and the function Logs_threaded.enable () function to enable thread-safe logging.

It is implemented by adding Logs.set_mutex which sets the lock and unlock functions that can be set by Logs_threaded.enable. They do nothing by default.

dbuenzli commented 5 years ago

@Julow that looks alright to me ! I'll merge once I get a bit of time for that.

dbuenzli commented 5 years ago

Your patch is in as 16cf5082abcb8eba7d290d260 I tweaked it in 83b4fae852806ab849f45. I'll soon do a release.

Julow commented 5 years ago

Great, thanks !

dbuenzli commented 5 years ago

Also build tweaks in 92d478c29cbc2a49745b41b66a6