Browse thread
enter_blocking_section() and string modifications
- Reed Wilson
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Reed Wilson <cedilla@g...> |
| Subject: | enter_blocking_section() and string modifications |
Hi guys! I'm currently writing a multi-threaded program, and part of the program is low-level string manipulation. I found that (with the code I'm using) making a tight C loop is quite a bit faster than using OCaml, so I'm using an external function for that. My question is: can I use enter_blocking_section() for character replacement on an OCaml string? I know I can't use it for allocating anything on the heap due to the possibility of the GC doing funny things with it, but would straight replacement of existing string data be OK? I did a test which runs OK, but "has not crashed" <> "will not crash"... Thanks, Reed