btk5h / skript-db

MIT License
5 stars 5 forks source link

Add support for executing on main thread #22

Closed ghost closed 3 years ago

ghost commented 5 years ago

I really need to execute on main thread so I wouldn't have any delays, I'm using in-memory local hosted database so connections do not need to be delayed for me, please add it

EDIT: It proved to be slow to do it on main thread, so I abandoned the idea.

btk5h commented 5 years ago

Unfortunately, performing I/O on the main thread is generally a terrible idea and I don't want users to fall into that trap.

I'd be open to allowing this, but we'd need some way to determine whether these calls are safe or have some sort of hidden feature that the user would have to opt-in to.