{"id":20477251,"url":"https://github.com/lockgit/pythonthread","last_synced_at":"2025-03-05T14:47:14.472Z","repository":{"id":87536590,"uuid":"49376957","full_name":"LockGit/PythonThread","owner":"LockGit","description":"Python Version  Thread Test","archived":false,"fork":false,"pushed_at":"2016-01-10T17:26:35.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-16T03:25:35.990Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LockGit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-10T17:20:14.000Z","updated_at":"2016-01-10T17:22:01.000Z","dependencies_parsed_at":"2023-03-17T13:40:49.448Z","dependency_job_id":null,"html_url":"https://github.com/LockGit/PythonThread","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LockGit%2FPythonThread","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LockGit%2FPythonThread/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LockGit%2FPythonThread/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LockGit%2FPythonThread/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LockGit","download_url":"https://codeload.github.com/LockGit/PythonThread/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242048381,"owners_count":20063400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T15:26:54.897Z","updated_at":"2025-03-05T14:47:14.441Z","avatar_url":"https://github.com/LockGit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PythonThread\nPython Version  Thread Test\n\n\njoin() 与 setDaemon 的区别\n------------\njoin([timeout])\n    主线程A中调用了B.join()，那么，主线程A会在调用的地方等待，直到子线程B完成操作后，才可以接着往下执行，那么在调用这个线程时可以使用被调用线程的join方法，里面的参数时可选的，代表线程运行的最大时间，即如果超过这个时间，不管这个此线程有没有执行完毕都会被回收，然后主线程或函数都会接着执行的。\n\nsetDaemon设置守护\n  主线程A中，创建了子线程B，并且在主线程A中调用了B.setDaemon(),这个的意思是，把主线程A设置为守护线程，这时候，要是主线程A执行结束了，就不管子线程B是否完成,一并和主线程A退出.这就是setDaemon方法的含义，这基本和join是相反的。\n  \n\nthreading.Thread(target=movie,args=('My Movice',))\n   args中最后加了一个逗号，这个逗号加上之后，程序执行就可以看到线程中的print信息。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flockgit%2Fpythonthread","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flockgit%2Fpythonthread","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flockgit%2Fpythonthread/lists"}