Commit d8892c4f authored by Christian Wander's avatar Christian Wander
Browse files

making naive threading work

parent da9ea048
from pixelframe import app
from flask import render_template
import pixelframe.threadfun as t
def main_page():
......@@ -10,3 +11,8 @@ def main_page():
def hello_method():
return render_template('hello.html', name="foo")
def threadfun():
return "Started work."
import threading
import time
def doit():
print(f'>> Starting a thread ...')
x = threading.Thread(target=threaded_function)
print(f'>> Thread started.')
def threaded_function():
print(f'>> Doing some work within thread ...')
print(f'>> Finished work within thread!')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment