IPythonKernel.log.debug can get stuck (waiting for writable socket ?)
- Lingua principale
- Python
- Stelle
- 734
- Fork
- 412
- Merge medio
- 1g 5h
- PR unite (30g)
- 8
Descrizione
I have (roughly) the following (working on Jedi completion):
```
def do_complete(self, code, cursor_pos):
...
txt, matches = self.shell.complete('', line, line_cursor)
result = {'matches' : matches,
'cursor_end' : cursor_pos,
'cursor_start' : cursor_pos - len(txt),
'metadata' : {},
'status' : 'ok'}
self.log.debug(json.dumps(result))
return result
```
The self.log.debug line will semi-randomly (like randomly but highly biased toward reproductible) just block. I've narrowed it down to it by printing a non context dependant long string (independant of the result). That's seem to be triggered only by nteract (cc @rgbkrk), but it feel worry some that enabling logging can halt the kernel in an indefinitely waiting state (which took me a days to debug).
I'm going to assume that's because the stream is waiting for something to write what has been written to it so write more and vice-versa on the other side. Unsure if there is a bug and whether this is smth we want to fix.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.