USE [master]GO/****** Object: StoredProcedure [dbo].[sp_who_lock] Script Date: 10/02/2014 06:18:19 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER...
分类:
数据库 时间:
2014-10-02 07:36:46
阅读次数:
221
1479: Treasure Chest Lock
Time Limit: 1 Sec Memory Limit: 128 MB
Submit: 7 Solved: 5
[Submit][Status][Web
Board]
Description
Vic has a treasure chest. And there is a lock on the treasure c...
分类:
其他好文 时间:
2014-10-01 17:40:21
阅读次数:
187
MySQL
事务没有提交导致锁等待Lockwaittimeoutexceededjava.lang.Exception:###
Errorupdatingdatabase.Cause:java.sql.SQLException:Lockwaittimeout
exceeded;tryrestartingtransaction###Theerrormayinvolve
defaultParameterMap###Theerroroccurredwhilesettingparameters#..
分类:
数据库 时间:
2014-10-01 01:37:21
阅读次数:
385
package?main?
import?(
"fmt"
"sync"
"runtime"
)
var?counter?int?=?0
func?Count(lock?*sync.Mutex)?{
lock.Lock()
counter++
fmt.Println(counter)
lock.Unlock()
}
func?main()?{
lo...
分类:
其他好文 时间:
2014-10-01 00:32:30
阅读次数:
389
package com.shijiaoyun.model;public class TestThread extends Thread {private String str;private static Object lock = new Object();public TestThread(St...
分类:
编程语言 时间:
2014-09-30 16:34:49
阅读次数:
205
volatile:多个线程同时访问一个变量,CLR为了效率,允许每个线程进行本地缓存,这就导致了变量的不一致性。volatile就是为了解决这个问题,volatile修饰的变量,不允许线程进行本地缓存,每个线程的读写都是直接操作在共享内存上,这就保证了变量始终具有一致性。lock:多个线程同时访问一...
分类:
其他好文 时间:
2014-09-30 16:32:09
阅读次数:
186
先插入测试数据:for(var i=1; i2;} });group联合$where查询db.test.group({key:{age:true},initial:{num:0},$reduce:function(doc,prev){prev.num++},condition:{$where:fu....
分类:
数据库 时间:
2014-09-30 13:16:49
阅读次数:
257
本文是学习网络上的文章时的总结,感谢大家无私的分享。
CyclicBarrier 类有一个整数初始值,此值表示将在同一点同步的线程数量。当其中一个线程到达确定点,它会调用await() 方法来等待其他线程。当线程调用这个方法,CyclicBarrier阻塞线程进入休眠直到其他线程到达。当最后一个线程调用CyclicBarrier
类的await() 方法,它唤醒所有等待的线程并继续执行它们的...
分类:
编程语言 时间:
2014-09-29 12:42:00
阅读次数:
175
mysql主键设置成auto_increment时,进行并发性能测试出现主键重复Duplicate entry 'xxx' for key 'PRIMARY'
解决方法:
在my.cnf的[mysqld]片段中添加设置innodb_autoinc_lock_mode=0
同时注意调大jdbc的活跃链接数,如设置 jdbc.maxActive=300,因为设置innodb_autoinc_lo...
分类:
数据库 时间:
2014-09-28 19:51:05
阅读次数:
209
UseAn access sequence is a search strategy that the system uses to find valid data for a particular condition type. It determines the sequence in whic...
分类:
数据库 时间:
2014-09-28 16:03:53
阅读次数:
231