lekernel changed the topic of #m-labs to: Mixxeo, Migen, MiSoC & other M-Labs projects :: fka #milkymist :: Logs http://irclog.whitequark.org/m-labs
antgreen has joined #m-labs
<sb0>
anyone has a Migen/MiSoC ZBT SRAM controller?
sturmflut_ has joined #m-labs
sturmflut has quit [Ping timeout: 252 seconds]
early has quit [Ping timeout: 252 seconds]
early has joined #m-labs
jaeckel has quit [Ping timeout: 272 seconds]
jaeckel has joined #m-labs
Bertl has quit [Ping timeout: 272 seconds]
fengling__ has joined #m-labs
fengling_ has quit [Ping timeout: 245 seconds]
Bertl has joined #m-labs
sturmflut_ has quit [Ping timeout: 246 seconds]
sturmflut has joined #m-labs
Bertl is now known as Bertl_zZ
sturmflut-work has joined #m-labs
fengling__ has quit [Quit: WeeChat 1.0]
Bertl_zZ is now known as Bertl
sturmflut has quit [Ping timeout: 246 seconds]
_florent_ has joined #m-labs
sturmflut has joined #m-labs
<sb0>
seriously, in python you can't terminate another thread while it is blocking on I/O? WTF?
<sb0>
this is completely stupid
<_florent_>
I had a similar issue a few days ago, didn't search that much, but yeah I wasn't able to terminate a thread waiting for a UDP packet that won't come anyway...
<_florent_>
If you find a workaround please share...
<sb0>
use asyncio in the thread (haha)
<sb0>
what happens if you close the socket it's attempting to read from? does it bomb or handle that correctly?
<sb0>
theoretically, it's just doing a os syscall, which at least on linux does the right thing
<sb0>
cancelling socket.create_connection is more of an issue...
<sb0>
bah
<sb0>
you can also just mark the threads as "terminate when you can" and let them do the cleanup...
<sb0>
they'll linger around in memory for a while until their ios complete or time out ...
<sb0>
hopefully you can forget about the threads after you have flagged them for termination, unless python messed up thread garbage collection too
<ysionneau>
you can provide a timeout to create_connection() maybe it can help?
<sb0>
if that timeout is 10 seconds, without cancellation support terminating the thread can take up to 10 seconds
<sb0>
which is pretty shitty
<ysionneau>
timeout seems to be a float so I guess you can provide the precise value which works best (or, let's say, less shitty) for you
<_florent_>
I ended up with a timeout in my case... which is yes pretty shitty, but it was a dirty test anyway...
<sb0>
what if your network is slow and you need that long timeout?
<GitHub165>
[artiq] sbourdeauducq pushed 1 new commit to master: http://git.io/NOoK
<GitHub165>
artiq/master b396f5d Yann Sionneau: pc_rpc: support for method listing, frontend: artiq_rpctool, +fixes by SB
<sb0>
ysionneau, what if you want to pass a list as sole argument to a rpc method?
<sb0>
I don't quite get how you parse the method arguments
<sb0>
why not simply eval each command line argument?
<sb0>
then you can use " or \ if they contain spaces
<ysionneau>
17:46 < sb0> ysionneau, what if you want to pass a list as sole argument to a rpc method? < you would have to do '((1,2,3))' which I confess is not really handy :/
<sb0>
why didn't you just do method(*[eval(arg) for arg in args]) ?
<ysionneau>
I wanted to avoid using the normal spliting by spaces to allow using spaces in python syntax without having to use " " everywhere