Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit59b1c51

Browse files
committed
Finalizer.Instance.Collect() and Runtime.TryCollectingGarbage(...) are now callable from Python
1 parent863397a commit59b1c51

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

‎src/runtime/Finalizer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ internal IncorrectRefCountException(IntPtr ptr)
106106

107107
#endregion
108108

109+
[ForbidPythonThreads]
109110
publicvoidCollect()=>this.DisposeAll();
110111

111112
internalvoidThrottledCollect()

‎src/runtime/Runtime.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ static bool TryCollectingGarbage(int runs, bool forceBreakLoops)
359359
/// </summary>
360360
/// <param name="runs">Total number of GC loops to run</param>
361361
/// <returns><c>true</c> if a steady state was reached upon the requested number of tries (e.g. on the last try no objects were collected).</returns>
362+
[ForbidPythonThreads]
362363
publicstaticboolTryCollectingGarbage(intruns)
363364
=>TryCollectingGarbage(runs,forceBreakLoops:false);
364365

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp