我做错了,是吗?
...
if( you_think_youre_genius )
goto goto_sucks:
...
pthread_mutex_lock(&mutex);
do_stuff();
goto_sucks:
do_other_stuff();
pthread_mutex_unlock(&mutex);
Run Code Online (Sandbox Code Playgroud) 我可以从一个线程调用executeBacth而另一个继续在同一个Statement(或PreparedStatement)对象上调用addBatch()吗?
更新:有没有人对此问题有所了解?因为我的结果不正确.并非所有添加到批处理中的更新都会执行.