Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
belenios
belenios
Commits
3d1e773e
Commit
3d1e773e
authored
Jun 30, 2013
by
Stephane Glondu
Browse files
Use Lwt_mutex.with_lock
parent
d647e625
Changes
1
Show whitespace changes
Inline
Side-by-side
src/web/registration.ml
View file @
3d1e773e
...
...
@@ -419,11 +419,10 @@ let get_randomness =
))
in
let
mutex
=
Lwt_mutex
.
create
()
in
fun
()
->
Lwt_mutex
.
lock
mutex
>
>
Lwt_mutex
.
with_
lock
mutex
(
fun
()
-
>
lwt
prng
=
Lazy
.
force
prng
in
let
r
=
Cryptokit
.
Random
.(
string
prng
32
)
in
Lwt_mutex
.
unlock
mutex
;
return
r
return
Cryptokit
.
Random
.(
string
prng
32
)
)
let
()
=
Eliom_registration
.
String
.
register
~
service
:
Services
.
get_randomness
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment