Skip to content

Commit 0852392

Browse files
author
dse
committed
All finalizers are disabled until valid implementation. Helps to avoid non relevant CI build faults.
1 parent 2ac981b commit 0852392

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

src/runtime/delegatemanager.cs

+4
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ public Dispatcher(IntPtr target, Type dtype)
195195

196196
~Dispatcher()
197197
{
198+
// We needs to disable Finalizers until it's valid implementation.
199+
// Current implementation can produce low probability floating bugs.
200+
return;
201+
198202
// Note: the managed GC thread can run and try to free one of
199203
// these *after* the Python runtime has been finalized!
200204
if (Runtime.Py_IsInitialized() > 0)

src/runtime/pyobject.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections;
33
using System.Dynamic;
44
using System.Linq.Expressions;
@@ -43,6 +43,10 @@ protected PyObject()
4343

4444
~PyObject()
4545
{
46+
// We needs to disable Finalizers until it's valid implementation.
47+
// Current implementation can produce low probability floating bugs.
48+
return;
49+
4650
Dispose();
4751
}
4852

src/runtime/pyscope.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Linq;
33
using System.Collections.Generic;
44
using System.Dynamic;
@@ -527,6 +527,10 @@ public void Dispose()
527527

528528
~PyScope()
529529
{
530+
// We needs to disable Finalizers until it's valid implementation.
531+
// Current implementation can produce low probability floating bugs.
532+
return;
533+
530534
Dispose();
531535
}
532536
}

src/runtime/pythonexception.cs

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ public PythonException()
5757

5858
~PythonException()
5959
{
60+
// We needs to disable Finalizers until it's valid implementation.
61+
// Current implementation can produce low probability floating bugs.
62+
return;
63+
6064
Dispose();
6165
}
6266

0 commit comments

Comments
 (0)