Skip to content

tiger3615/DistributedConcurrent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

This is a tool that support many JVM running code in different computer. that thread can be synchronized.

following step.

  1. add DisCur-1.0.5.jar to your class path.
  2. DisCur.json configure in your class path.
	{
		"IPs":["IP1","IP2"],  //thread synchronzied server IPs
		"port":2000,  // synchronzied server listenning port
		"scanServerIntervalms":1000 // as client, detect server loop time length
	}
  1. Coding
	DisCur.init();//just call once
	DisCur.lock("keyStr");// here we use String as lock object
	try{
		DisCur.myWait();// current thread wait. currently only support one layer thread.
		// DisCur.myWait(1000);
		// DisCur.myWait();
		// DisCur.myNotifyAll();
		// DisCur.myNotify();
	}finally{
		DisCur.unlock("keyStr");
	}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages