我遇到以下問題。 我在我的routes.rb文件中的資源設置爲以下 resources :users do
resources :sub_transactions
end
resources :sub_transactions do
collection do
get :income
get :expenditure
end
end
我有幾行代碼: // index is an integer
Mutex mutex = new Mutex(false, "MUTEX_PREFIX" + index.ToString());
mutex.WaitOne();
// Access to the shared object which should not be accessed by multiple threads.
for (int i = 0; i < 100; i++)
{
// If current thread needs resource(i) then
Mutex mutex = new Mutex(false, "Mutex" + i.ToString());
mutex.WaitOne();
// synchronized access t