use recursive_mutex to protect State
authorWez Furlong <wez@fb.com>
Thu, 10 Jul 2014 18:37:17 +0000 (11:37 -0700)
committerTudor Bosman <tudorb@fb.com>
Mon, 14 Jul 2014 19:13:48 +0000 (12:13 -0700)
commitd7f1adb631b9b6c989eeef31aae04c4472adf370
tree63564b63dfc62369a74fcf53ef1b0c1fe908a266
parentdf377ed2a89f02d266468ef2a2d4ea109f741138
use recursive_mutex to protect State

Summary:
maelstrom destructs a Promise during an indirect call from
maybeCallback and deadlocks on itself unless we use a recursive mutex.

There may be a smarter way to proceed but at the moment I can't build
and deploy a package from trunk because the service is non-functional
:-/

Test Plan:
run

```
fbconfig -r folly/wangle messaging/maelstrom
fbmake runtests
```

Reviewed By: hannesr@fb.com

Subscribers: fugalh, fsilva

FB internal diff: D1428504
folly/wangle/detail/State.h