Vexatos / Computronics

A ComputerCraft/OpenComputers addon mod.
125 stars 51 forks source link

"tape write" not accepting interrupts #168

Closed Cypher121 closed 8 years ago

Cypher121 commented 8 years ago

If you try to Ctrl+Alt+C a tape write, it doesn't react... until it's done, after which they all are just dumped onto OpenOS, immediately shutting down the computer.

Vexatos commented 8 years ago

To allow interrupting, I would have to put os.sleep() somewhere in the code which would make writing a lot slower than it already is... Not sure what to do about it.

Cypher121 commented 8 years ago

os.sleep() at reasonable intervals?

Vexatos commented 8 years ago

But what is "reasonable"? Writing music already is incredibly slow...

Vexatos commented 8 years ago

What I could do it have a confirmation message appear before starting to write (which could be circumvented using -y) in case someone accidentally runs the program. This would probably just be an annoyance for most people but not nearly as much of an annoyance as os.sleep() would be.

Cypher121 commented 8 years ago

Well, if removing tape will stop the write, interrupts aren't much of a problem anyway. It's for cases where something was done wrong, like placing wrong tape.

Speaking of messages, warning for tape overwrite would be nice.