How to use skitai - 2 common examples

To help you get started, we’ve selected a few skitai examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hansroh / aquests / aquests / dbapi / dbpool.py View on Github external
conn.execute ("SELECT * FROM cities;")
		rs = conn.fetchwait (5)
		print(rs.status, rs.result)
		
		conn.execute ("INSERT INTO weather VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27');")		
		rs = conn.wait (5)
		print(rs.status, rs.result)
		
		conn.execute ("INSERT INTO weather VALUES ('San Francisco', 54, 67, 0.25, '1994-11-27');")		
		rs = conn.wait (5)
		print(rs.status, rs.result)
		
		
	threading.Thread (target = query).start ()	
	while threading.activeCount () > 1:
		lifetime.loop ()
github hansroh / aquests / aquests / athreads / threadlib.py View on Github external
def run (self):
		while 1:		
			job = self.queue.get ()		
			if job is None: break			
			with self.lock:
				self.idle = 0
				self.command = str (job)
			
			start_time = time.time()			
			try:
				job ()
			except MemoryError:
				self.logger.trace ("thread #%d" % self.id)				
				lifetime.shutdown (1, 1.0)				
			except:
				self.logger.trace ("thread #%d" % self.id)
				
			exc_time = time.time() - start_time
			with self.lock:
				self.exec_time = exc_time
				self.idle = 1				
			del job

skitai

Skitai App Engine

MIT
Latest version published 7 months ago

Package Health Score

47 / 100
Full package analysis

Similar packages