biolab / biolab/orange-widget-base
[RFC] Widget multiprocessing
- Dominant language
- Python
- Stars
- 28
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
Today @ajdapretnar, @lanzagar, @PrimozGodec and I talked about making all Orange widgets run concurrently.
The goal is to never freeze the main canvas GUI thread/process. When a widget is doing something, its window can freeze, but other widgets and the canvas should still be interactable. The widget's `NodeItem` on canvas should display an indefinite loading animation.
Note: It's still great to multithread things within widget, this'll make the widget's window not freeze while the task is running.
@PrimozGodec noted that threads cannot be forcefully stopped, so they're not appropriate for this. With threads, the solution would have to check if it was signalled to stop every so often, which is not viable for large-scale concurrency.
A multi-process solution must be implemented. To a widget process, the outside world must be immutable. Communicating with the main process, it receives some input signal data and sends some output signal data.
The canvas end must wait for the widget's processing to finish without freezing up. So there should be a thread waiting for widgets to finish, and/or receiving outputs should be integrated into the Qt event loop?
Contributor guide
Research direction
No files, tests, or entry points are named. Start by mapping the widget execution and canvas communication paths, then determine how process isolation, input/output signals, cancellation, and loading state should work before defining tests and completion criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100