SiriProxy icon indicating copy to clipboard operation
SiriProxy copied to clipboard

Siri & Ruby

Open ihardyslide opened this issue 14 years ago • 4 comments

Everytime I insert the Ruby command "sleep" in my plugin, Siri just 'spins' and does nothing, but in the terminal I see that it works. So my question, does Siri not fit with "sleep(seconds)"?

ihardyslide avatar Dec 06 '11 17:12 ihardyslide

Are you specifying a value? "sleep" with no parameters sleeps forever. I'm using sleep in a plugin with no problems.

mrmosconi avatar Dec 06 '11 21:12 mrmosconi

yea, i use sleep(10), for 10 seconds

ihardyslide avatar Dec 06 '11 21:12 ihardyslide

I would try "sleep 0.1" as a test. As I said, I use "sleep" in my plugin without issue.

mrmosconi avatar Dec 06 '11 23:12 mrmosconi

Make sure you're not sleeping your primary thread. If you want to do something after a delay, then spawn a new thread and sleep that one for a bit. We should probably spawn each listen_for into its own thread anyway, but that's probably a bit down the line.

Anyway, this seems like a ruby issue, not a SiriProxy issue.

plamoni avatar Dec 07 '11 03:12 plamoni