[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [Patch] Finalization of function objects
- From: "Thomas Harning Jr." <harningt@...>
- Date: Fri, 31 Jul 2009 22:09:13 -0400
On Fri, Jul 31, 2009 at 5:51 PM, Thomas Harning Jr.<harningt@gmail.com> wrote:
> On Fri, Jul 31, 2009 at 4:55 PM, TNHarris<telliamed@whoopdedo.org> wrote:
>> I don't believe the original patch was marking the coroutines
>> properly. I redid the GC so finalizers are treated similarly to userdata
>> __gc methods, the coroutine doesn't get collected until a second
>> finalize pass is done.
>> [lua514-finalizers0609.patch]
> Awesome, the patch passes successfully.
Ran through the test and things don't quick look right. I'll have to
write up some more detailed test cases.
Here's the diff in the output of the original and your finalizer patch:
--- out 2009-07-31 22:04:30.000000000 -0400
+++ out2 2009-07-31 22:04:38.000000000 -0400
@@ -15,8 +15,8 @@
-- Transaction
OK
-- Coroutine
-F test.lua:113: on failure
-Z test.lua:113: on failure
OK
-- GC'ed coroutine
+T
+Z
OK
Basically, it looks like the on-error-condition patch is not getting
called in the co-routine case. I don't recall what was required to
get that working...
Also.. it looks like it's printing the success case rather than the
failure case. I'll see if I can figure out what is going on... will
need to first digest how your patch does the condition tracking.
--
Thomas Harning Jr.