Skip to content

Commit 5db999e

Browse files
author
Benoit Germain
committed
Fixed error handling when handler isn't called
* bumped version to 3.9.4 * set_finalizer throws an error if provided finalizer isn't a function * fix error handling when the error doesn't generate an error handler call (IOW, all errors but LUA_ERRRUN) * provide callstack if LUA_ERRRUN occurs inside a finalizer
1 parent 43343cc commit 5db999e

File tree

3 files changed

+218
-207
lines changed

3 files changed

+218
-207
lines changed

CHANGES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
CHANGES:
22

3+
CHANGE 108: BGe 20-Mar-14
4+
* bumped version to 3.9.4
5+
* set_finalizer throws an error if provided finalizer isn't a function
6+
* fix error handling when the error doesn't generate an error handler call (IOW, all errors but LUA_ERRRUN)
7+
* provide callstack if LUA_ERRRUN occurs inside a finalizer
8+
39
CHANGE 107: BGe 19-Mar-14
410
* Make sure we don't mutex-wrap require() more than once, just in case
511

docs/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
</p>
7171

7272
<p>
73-
This document was revised on 27-Feb-14, and applies to version <tt>3.9.3</tt>.
73+
This document was revised on 20-Mar-14, and applies to version <tt>3.9.4</tt>.
7474
</p>
7575
</font>
7676
</center>
@@ -252,6 +252,10 @@ <h2 id="initialization">Initialization</h2>
252252
<p>
253253
At the same time, <tt>configure()</tt> itself will be replaced by another function that raises an error if called again with differing arguments, if any.
254254
</p>
255+
<p>
256+
Also, once Lanes is initialized, <tt>require()</tt> is replaced by another one that wraps it inside a mutex, both in the main state and in all created lanes. This prevents multiple thread-unsafe module initializations from several lanes to occur simultaneously.
257+
It remains to be seen whether this is actually useful or not: If a module is already threadsafe, protecting its initialization isn't useful. And if it is not, any parallel operation may crash without Lanes being able to do anything about it.
258+
</p>
255259
<p>
256260
<b>IMPORTANT NOTE:</b> Starting with version 3.7.0, only the first occurence of <tt>require "lanes"</tt> must be followed by a call to <tt>.configure()</tt>. From this point, a simple <tt>require "lanes"</tt> will do wherever you need to require lanes again.
257261
</p>

0 commit comments

Comments
 (0)