equal
deleted
inserted
replaced
4436 | stream retry | |
4436 | stream retry | |
4437 |
4437 |
4438 retry := false. |
4438 retry := false. |
4439 [ stream := aBlock value ] on:OpenError do:[:ex| |
4439 [ stream := aBlock value ] on:OpenError do:[:ex| |
4440 (ex errorCode) == (OperatingSystem errorNumberFor:#EMFILE) ifTrue:[ |
4440 (ex errorCode) == (OperatingSystem errorNumberFor:#EMFILE) ifTrue:[ |
|
4441 "Worst case, try to cleanup" |
4441 [ |
4442 [ |
4442 FinalizationLobby finalizeNow. |
4443 FinalizationLobby finalizeNow. |
|
4444 Delay waitForSeconds: 5. "/Give Java finalization thread a chance to clean up |
4443 ObjectMemory garbageCollect. |
4445 ObjectMemory garbageCollect. |
4444 retry := true. |
4446 retry := true. |
4445 ] on: Error do:[:ex| |
4447 ] on: Error do:[:ex| |
4446 Logger log: 'Failed to force finalization: ', ex description severity: #error facility: #JVM |
4448 Logger log: 'Failed to force finalization: ', ex description severity: #error facility: #JVM |
4447 ]. |
4449 ]. |