This repository was archived by the owner on Jul 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
fix: Use daemon threads for SolverManager #69
Merged
Christopher-Chianelli
merged 14 commits into
TimefoldAI:main
from
Christopher-Chianelli:custom-thread-factory
Jun 13, 2024
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
66e2981
feat: Use daemon threads for SolverManager
Christopher-Chianelli 1aee450
chore: Add tests for SolverManager.create, deep copy input problem
Christopher-Chianelli 6889f32
docs: Fix SolverManagerConfig docstring
Christopher-Chianelli ea54d8f
docs: Fix SolverManager.create docstring
Christopher-Chianelli 293d284
fix: Use an impossible to solve initial problem
Christopher-Chianelli ced756d
fix: Use 4 for parallel_solver_count
Christopher-Chianelli 326becf
fix: Bump parallel_solver_count to 12
Christopher-Chianelli a1f546b
fix: Remove tests
Christopher-Chianelli 0231a35
test: Use only one solver manager in test
Christopher-Chianelli 71f04f8
fix: maybe?
Christopher-Chianelli d2a9434
test: Only do problem_change_solver_run once
Christopher-Chianelli 17b79a6
fix: comment out code associated with flakey test
Christopher-Chianelli 361c499
test: remove extra solver managers
Christopher-Chianelli 0198682
chore: Add comment explaining catch-22, remove commented out code
Christopher-Chianelli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
timefold-solver-python-core/src/main/java/ai/timefold/solver/python/DaemonThreadFactory.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package ai.timefold.solver.python; | ||
|
||
import java.util.concurrent.Executors; | ||
import java.util.concurrent.ThreadFactory; | ||
|
||
public class DaemonThreadFactory implements ThreadFactory { | ||
Christopher-Chianelli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
private static final ThreadFactory THREAD_FACTORY = Executors.defaultThreadFactory(); | ||
|
||
@Override | ||
public Thread newThread(Runnable runnable) { | ||
Thread out = THREAD_FACTORY.newThread(runnable); | ||
out.setDaemon(true); | ||
return out; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.