- 博客(2)
- 收藏
- 关注
原创 git fatal: reference is not a tree错误处理方法
当checkout遇见“fatal: reference is not a tree”的错误时,可能是因为非常规操作导致分支的HEAD文件时间早与主分支的HEAD文件时间。使用touch命令将分支HEAD时间刷新即可。#linuxtouch .git/refs/heads/分支名#windows powershellSet-ItemProperty -Path .git\refs\heads\分支名 -Name CreationTime -Value (date)Set-ItemPropert
2021-08-27 16:03:39
8645
原创 python限制最大线程数(不一样的方法)
实际工作中会遇到有成千上万个任务想使用多线程来完成,而计算机无法同时处理这么多线程,通常来说会因为内存消耗完而无法创建新的线程。在诸多大佬的博客中找到如下解决方案:import threadingimport time sem=threading.Semaphore(4) #限制线程的最大数量为4个 def gothread(): with sem: #锁定线程的最大数量 for i in range(100000): print(threading.current_t
2020-12-09 09:34:08
8308
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人