alexmojaki / alexmojaki/funcfinder

Using multiple processes and terminating answers

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
discussion enhancement
Dominant language
Python
Stars
167
Forks
4
PR merge metrics
No merged PRs in 30d

Description

A serious flaw in the theory of asking your own questions is that a single poorly written answer can ruin everything if it takes a long time. An answer might not even terminate when running from a particular question if it has a bug that causes it to enter an infinite loop. It's desirable therefore to run questions/answers in one or more separate threads/processes and kill them if they reach a timeout for a single answer. However looking into this always leads to warnings about what a bad idea it is (e.g. http://stackoverflow.com/questions/323972/is-there-any-way-to-kill-a-thread-in-python). As far as I can tell using processes for this purpose is less risky, although still problematic. Multiple processes would also speed up question asking by using multiple cores in parallel.

My concurrency abilities are not fantastic and multiple processes and the risks involved with terminating them are especially beyond my expertise. This would also increase the chances of problems across platforms which I wouldn't be able to test. Besides that, concurrency just always increases complexity.

Therefore, while I feel that this is a valuable area to explore, I'm not willing to approach it without some help from people with experience and some indication that this is needed (e.g. reports of a faulty answer stalling a question).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.