Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator
Paste P373

test-uwsgi-threading.py
ActivePublic

Authored by yuvipanda on Mar 9 2015, 11:00 AM.
Tags
None
Referenced Files
F65177: test-uwsgi-threading.py
Mar 9 2015, 11:00 AM
Subscribers
None
from flask import Flask
from threading import Thread
app = Flask(__name__)
i = 0
def increment_counter():
global i
i += 1
@app.route('/')
def main():
t = Thread(target=increment_counter)
t.start()
t.join()
return str(i)
if __name__ == '__main__':
app.run()

Event Timeline

yuvipanda changed the title of this paste from untitled to test-uwsgi-threading.py.
yuvipanda updated the paste's language from autodetect to autodetect.