同步multiRunnable

时间:2016-06-12 11:50:52

标签: java synchronization runnable

我有3个可运行的任务

mysql_result($query_run, 0, 'user_id')

我为我的对象设置'synchronized'

    PeriodRunnable runnableJob1 = new PeriodRunnable(driver, bolgaria);
    PeriodRunnable runnableJob2 = new PeriodRunnable(driver, egipet);
    PeriodRunnable runnableJob3 = new PeriodRunnable(driver, turc);

    runnableJob1.run();
    runnableJob2.run();
    runnableJob3.run();

但我的runnableJobs一起开始工作。我做错了什么,请告诉我?

0 个答案:

没有答案