Skip to content

Instantly share code, notes, and snippets.

class Backend(object):
def __init__(self):
engine = create_engine("mysql://{0}:{1}@{2}/{3}".format(options.mysql_user, options.mysql_pass, options.mysql_host, options.mysql_db)
, pool_size = options.mysql_poolsize
, pool_recycle = 3600
, echo=options.debug
, echo_pool=options.debug)
self._session = sessionmaker(bind=engine)
@classmethod
@skymanrm
skymanrm / custom coroutine.cs
Created December 4, 2015 07:33 — forked from hbbalfred/custom coroutine.cs
custom coroutine in unity3d
using UnityEngine;
using System.Collections;
namespace Task
{
public class WaitDone : YieldInstruction
{
public bool Done{get; set;}
Seq task;