Python澶氱嚎绋嬩箣姝婚攣

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python澶氱嚎绋嬩箣姝婚攣相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/hex' title='hex'>hex   鍗犵敤   婕旂ず   鍚戦噺   init   open   http   寰幆   鍚屾   

 

 

1.浠€涔堟槸姝婚攣锛?/h3>

姝婚攣鏄敱浜庝袱涓垨浠ヤ笂鐨勭嚎绋嬩簰鐩告寔鏈夊鏂归渶瑕佺殑璧勬簮锛屼笖閮戒笉閲婃斁鍗犳湁鐨勮祫婧愶紝瀵艰嚧杩欎簺绾跨▼澶勪簬绛夊緟鐘舵€侊紝绋嬪簭鏃犳硶鎵ц銆?/p>

2.浜х敓姝婚攣鐨勫洓涓繀瑕佹潯浠?/h3>

銆€銆€銆€1.浜掓枼鎬э細绾跨▼瀵硅祫婧愮殑鍗犳湁鏄帓浠栨€х殑锛屼竴涓祫婧愬彧鑳借涓€涓嚎绋嬪崰鏈夛紝鐩村埌閲婃斁銆?/p>

銆€銆€銆€2.璇锋眰鍜屼繚鎸佹潯浠讹細涓€涓嚎绋嬪璇锋眰琚崰鏈夎祫婧愬彂鐢熼樆濉炴椂锛屽宸茬粡鑾峰緱鐨勮祫婧愪笉閲婃斁銆?/p>

銆€銆€銆€3.涓嶅墺澶猴細涓€涓嚎绋嬪湪閲婃斁璧勬簮涔嬪墠锛屽叾浠栫殑绾跨▼鏃犳硶鍓ュず鍗犵敤銆?/p>

銆€銆€銆€4.寰幆绛夊緟锛氬彂鐢熸閿佹椂锛岀嚎绋嬭繘鍏ユ寰幆锛屾案涔呴樆濉炪€?/p>

3.浜х敓姝婚攣鐨勫師鍥?/h3>

鍦ㄥ绾跨▼鐨勫満鏅紝姣斿绾跨▼A鎸佹湁鐙崰閿佽祫婧恆锛屽苟灏濊瘯鍘昏幏鍙栫嫭鍗犻攣璧勬簮b鍚屾椂锛岀嚎绋婤鎸佹湁鐙崰閿佽祫婧恇锛屽苟灏濊瘯鍘昏幏鍙栫嫭鍗犻攣璧勬簮a銆?br />杩欐牱绾跨▼A鍜岀嚎绋婤鐩镐簰鎸佹湁瀵规柟闇€瑕佺殑閿侊紝浠庤€屽彂鐢熼樆濉烇紝鏈€缁堝彉涓烘閿併€?/p>

閫犳垚姝婚攣鐨勫師鍥犲彲浠ユ鎷垚涓夊彞璇濓細
1.涓嶅悓绾跨▼鍚屾椂鍗犵敤鑷繁閿佽祫婧?br />2.杩欎簺绾跨▼閮介渶瑕佸鏂圭殑閿佽祫婧?br />3.杩欎簺绾跨▼閮戒笉鏀惧純鑷繁鎷ユ湁鐨勮祫婧?/p>

鎶€鏈浘鐗? src=

绾跨▼A鎸佹湁閿佽祫婧恆鐨勫悓鏃讹紝绾跨▼B涔熸寔鏈変簡閿佽祫婧恇銆?br />绾跨▼A鎯宠缁х画鎵ц闇€瑕侀攣璧勬簮b锛岀嚎绋婤鎯宠缁х画鎵ц闇€瑕侀攣璧勬簮a
绾跨▼A涓嶉噴鏀鹃攣璧勬簮a锛岀嚎绋婤涓嶉噴鏀鹃攣璧勬簮b
绾跨▼A绾跨▼B閮介渶瑕乤锛宐涓ゆ妸閿侊紝濡傛灉鎴戜滑鍔犻攣鐨勯『搴忎竴鑷达紙绾跨▼A鍏堟嬁a鍔犻攣锛屽啀鎷縝鍔犻攣锛屽啀瑙i攣b锛岀劧鍚庤В閿乤锛岀嚎绋婤鍚岀悊锛夛紝灏变笉浼氬嚭鐜版閿佺殑鎯呭喌銆?/p>

 

4.涓夌鍏稿瀷鐨勬閿?/h3>

甯歌鐨?绉嶆閿佺殑绫诲瀷:闈欐€佺殑閿侀『搴忔閿?/strong>锛?strong>鍔ㄦ€佺殑閿侀『搴忔閿?/strong>锛?strong>鍗忎綔瀵硅薄涔嬮棿鐨勬閿?/strong>銆?/p>

闈欐€佺殑閿侀『搴忔閿?/strong>

a鍜宐涓や釜鏂规硶閮介渶瑕佽幏寰桝閿佸拰B閿併€備竴涓嚎绋嬫墽琛宎鏂规硶涓斿凡缁忚幏寰椾簡A閿侊紝鍦ㄧ瓑寰匓閿侊紱鍙︿竴涓嚎绋嬫墽琛屼簡b鏂规硶涓斿凡缁忚幏寰椾簡B閿侊紝鍦ㄧ瓑寰匒閿併€傝繖绉嶇姸鎬侊紝灏辨槸鍙戠敓浜嗛潤鎬佺殑閿侀『搴忔閿併€?/p>

闈欐€佹槸鎸囷紝鍦ㄧ▼搴忎腑锛屽浜庢煇涓攣鏉ヨ鍔犻攣鍜岃В閿佺殑浣嶇疆鏄笉鍙樼殑銆?/p>

鎴戜滑鐢≒ython鐩磋鐨勬紨绀轰竴涓嬮潤鎬佺殑閿侀『搴忔閿併€?br />鍋囪閾惰绯荤粺涓紝鐢ㄦ埛a璇曞浘杞处100鍧楃粰鐢ㄦ埛b锛屼笌姝ゅ悓鏃剁敤鎴穊璇曞浘杞处200鍧楃粰鐢ㄦ埛a锛屽垯鍙兘浜х敓姝婚攣銆?br />2涓嚎绋嬩簰鐩哥瓑寰呭鏂圭殑閿侊紝浜掔浉鍗犵敤鐫€璧勬簮涓嶉噴鏀俱€?/p>

# coding=utf-8
import time
import threading


class Account:
    def __init__(self, _id, balance):
        self.id = _id
        self.balance = balance
    def withdraw(self, amount):
        self.balance -= amount
    def deposit(self, amount):
        self.balance += amount


def transfera_b(_from, to, amount):
    lock_a.acquire()  # 閿佷綇鑷繁鐨勮处鎴?/span>
    time.sleep(1)  # 璁╀氦鏄撴椂闂村彉闀匡紝2涓氦鏄撶嚎绋嬫椂闂翠笂閲嶅彔锛屾湁瓒冲鏃堕棿鏉ヤ骇鐢熸閿?/span>
    _from.withdraw(amount)
    print(鈥?/span>wait for lock_b鈥?/span>)
    lock_b.acquire()  # 閿佷綇瀵规柟鐨勮处鎴?/span>
    to.deposit(amount)
    lock_b.release()
    lock_a.release()


def transferb_a(_from, to, amount):
    lock_b.acquire()  # 閿佷綇鑷繁鐨勮处鎴?/span>
    time.sleep(1)  # 璁╀氦鏄撴椂闂村彉闀匡紝2涓氦鏄撶嚎绋嬫椂闂翠笂閲嶅彔锛屾湁瓒冲鏃堕棿鏉ヤ骇鐢熸閿?/span>
    _from.withdraw(amount)
    print(鈥?/span>wait for lock_a鈥?/span>)
    lock_a.acquire()  # 閿佷綇瀵规柟鐨勮处鎴?/span>
    to.deposit(amount)
    lock_a.release()
    lock_b.release()

lock_a = threading.Lock()
lock_b = threading.Lock()
a = Account(鈥?/span>a鈥?/span>, 1000)
b = Account(鈥?/span>b鈥?/span>, 1000)
#a寰€b杞处100
t1 = threading.Thread(target=transfera_b, args=(a, b, 100))
t1.start()
#b寰€a杞处200
t2 = threading.Thread(target=transferb_a, args=(b, a, 200))
t2.start()
t1.join()
t2.join()
print("a鐨勮处鎴蜂綑棰濓細",a.balance)
print("b鐨勮处鎴蜂綑棰濓細",b.balance)

 

鍔ㄦ€佺殑閿侀『搴忔閿?/strong>

鍔ㄦ€佺殑閿侀『搴忔閿佹槸鎸囦袱涓嚎绋嬭皟鐢ㄥ悓涓€涓柟娉曟椂锛屼紶鍏ョ殑鍙傛暟棰犲€掗€犳垚鐨勬閿併€傚涓嬩唬鐮侊紝涓€涓嚎绋嬭皟鐢ㄤ簡transfer鏂规硶骞朵紶鍏ュ弬鏁癮,b,100锛涘彟涓€涓嚎绋嬭皟鐢ㄤ簡transfer鏂规硶骞朵紶鍏ュ弬鏁癰,a,200銆傛鏃跺氨鍙兘鍙戠敓鍦ㄩ潤鎬佺殑閿侀『搴忔閿佷腑瀛樺湪鐨勯棶棰橈紝鍗筹細绗竴涓嚎绋嬭幏寰椾簡a鐨勯攣骞剁瓑寰卋鐨勯攣锛岀浜屼釜绾跨▼鑾峰緱浜哹鐨勯攣閿佸苟绛夊緟a鐨勯攣銆?/div>
杩欓噷鍔ㄦ€佹槸鎸囷紝鏌愪釜閿佷細鏍规嵁鍙傛暟鐨勪紶閫掞紝鍦ㄤ笉鍚岀殑浣嶇疆鍔犻攣鍜岃В閿併€?/div>
鎴戜滑杩欓噷杩樻槸杞处鐨勪緥瀛愶細
# coding=utf-8
import time
import threading

class Account:
    def __init__(self, _id, balance):
        self.id = _id
        self.balance = balance
        self.lock = threading.Lock()
    def withdraw(self, amount):
        self.balance -= amount
    def deposit(self, amount):
        self.balance += amount

def transfer(_from,to, amount):
    _from.lock.acquire()  # 閿佷綇鑷繁鐨勮处鎴?/span>
    time.sleep(1)  # 璁╀氦鏄撴椂闂村彉闀匡紝2涓氦鏄撶嚎绋嬫椂闂翠笂閲嶅彔锛屾湁瓒冲鏃堕棿鏉ヤ骇鐢熸閿?/span>
    _from.withdraw(amount)
    print(鈥?/span>wait for lock鈥?/span>)
    to.lock.acquire()  # 閿佷綇瀵规柟鐨勮处鎴?/span>
    to.deposit(amount)
    to.lock.release()
    _from.lock.release()

a = Account(鈥?/span>a鈥?/span>, 1000)
b = Account(鈥?/span>b鈥?/span>, 1000)
#a寰€b杞处100
t1 = threading.Thread(target=transfer, args=(a, b, 100))
t1.start()
#b寰€a杞处200
t2 = threading.Thread(target=transfer, args=(b, a, 200))
t2.start()
t1.join()
t2.join()
print("a鐨勮处鎴蜂綑棰濓細",a.balance)
print("b鐨勮处鎴蜂綑棰濓細",b.balance)

 

鍗忎綔瀵硅薄涔嬮棿鐨勬閿?/strong>

濡傛灉鍦ㄦ寔鏈夐攣鏃惰皟鐢ㄦ煇涓閮ㄦ柟娉曪紝閭d箞灏嗗彲鑳藉嚭鐜版閿侀棶棰樸€傚湪杩欎釜澶栭儴鏂规硶涓彲鑳戒細鑾峰緱鍏朵粬閿侊紝鎴栬€呴樆濉炴椂闂磋繃闀匡紝瀵艰嚧鍏朵粬绾跨▼鏃犳硶鍙婃椂鑾峰緱褰撳墠琚寔鏈夌殑閿併€?/p>

涓轰簡閬垮厤杩欑鍗遍櫓鐨勬儏鍐靛彂鐢燂紝鎴戜滑浣跨敤寮€鏀捐皟鐢ㄣ€傚鏋滆皟鐢ㄦ煇涓閮ㄦ柟娉曟椂涓嶉渶瑕佹寔鏈夐攣锛屾垜浠О涔嬩负寮€鏀捐皟鐢ㄣ€?/p>

 

5.閬垮厤姝婚攣鐨勬柟娉曪紙閲嶇偣锛?/h3>

閬垮厤姝婚攣鍙互姒傛嫭鎴愪笁绉嶆柟娉曪細

閿侀『搴忔搷浣滅殑姝婚攣锛?/strong>

瑙e喅闈欐€佺殑閿侀『搴忔閿佺殑鏂规硶锛氭墍鏈夐渶瑕佸涓攣鐨勭嚎绋嬶紝閮借浠ョ浉鍚岀殑椤哄簭鏉ヨ幏寰楅攣銆?/p>

鎶€鏈浘鐗? id=
# coding=utf-8
import time
import threading


class Account:
    def __init__(self, _id, balance):
        self.id = _id
        self.balance = balance
    def withdraw(self, amount):
        self.balance -= amount
    def deposit(self, amount):
        self.balance += amount


def transfera_b(_from, to, amount):
    lock_a.acquire()  # 閿佷綇鑷繁鐨勮处鎴?/span>
    time.sleep(1)  # 璁╀氦鏄撴椂闂村彉闀匡紝2涓氦鏄撶嚎绋嬫椂闂翠笂閲嶅彔锛屾湁瓒冲鏃堕棿鏉ヤ骇鐢熸閿?/span>
    _from.withdraw(amount)
    lock_b.acquire()  # 閿佷綇瀵规柟鐨勮处鎴?/span>
    to.deposit(amount)
    lock_b.release()
    lock_a.release()


def transferb_a(_from, to, amount):
    lock_a.acquire()  # 閿佷綇鑷繁鐨勮处鎴?/span>
    time.sleep(1)  # 璁╀氦鏄撴椂闂村彉闀匡紝2涓氦鏄撶嚎绋嬫椂闂翠笂閲嶅彔锛屾湁瓒冲鏃堕棿鏉ヤ骇鐢熸閿?/span>
    _from.withdraw(amount)
    lock_b.acquire()  # 閿佷綇瀵规柟鐨勮处鎴?/span>
    to.deposit(amount)
    lock_b.release()
    lock_a.release()

lock_a = threading.Lock()
lock_b = threading.Lock()
a = Account(鈥?/span>a鈥?/span>, 1000)
b = Account(鈥?/span>b鈥?/span>, 1000)
#a寰€b杞处100
t1 = threading.Thread(target=transfera_b, args=(a, b, 100))
t1.start()
#b寰€a杞处200
t2 = threading.Thread(target=transferb_a, args=(b, a, 200))
t2.start()
t1.join()
t2.join()
print("a鐨勮处鎴蜂綑棰濓細",a.balance)
print("b鐨勮处鎴蜂綑棰濓細",b.balance)
View Code

瑙e喅鍔ㄦ€佺殑閿侀『搴忔閿佺殑鏂规硶锛氭瘮杈冧紶鍏ラ攣瀵硅薄鐨勫搱甯屽€硷紝鏍规嵁鍝堝笇鍊肩殑澶у皬鏉ョ‘淇濇墍鏈夌殑绾跨▼閮戒互鐩稿悓鐨勯『搴忚幏寰楅攣 銆?/p>

鎶€鏈浘鐗? id=
# coding=utf-8
import threading
import hashlib
class Account:
    def __init__(self, _id, balance):
        self.id = _id
        self.balance = balance
        self.lock = threading.Lock()
    def withdraw(self, amount):
        self.balance -= amount
    def deposit(self, amount):
        self.balance += amount

def transfer(_from, to, amount):
    hasha,hashb = hashlock(_from, to)
    if hasha >hashb:
        _from.lock.acquire()  # 閿佷綇鑷繁鐨勮处鎴?/span>
        to.lock.acquire()  # 閿佷綇瀵规柟鐨勮处鎴?/span>
        #浜ゆ槗#################
        _from.withdraw(amount)
        to.deposit(amount)
        #################
        to.lock.release()
        _from.lock.release()
    elif hasha < hashb:
        to.lock.acquire()  # 閿佷綇鑷繁鐨勮处鎴?/span>
        _from.lock.acquire()  # 閿佷綇瀵规柟鐨勮处鎴?/span>
        # 浜ゆ槗#################
        _from.withdraw(amount)
        to.deposit(amount)
        #################
        _from.lock.release()
        to.lock.release()
    else: ##hash鍊肩浉绛夛紝鏈€涓婂眰浣跨敤mylock閿侊紝浣犲彲浠ユ妸transfer鍋氭垚涓€涓被锛屾绫讳腑瀹炰緥涓€涓猰ylock銆?/span>
        mylock.acquire()
        _from.lock.acquire()  # 閿佷綇鑷繁鐨勮处鎴?/span>
        to.lock.acquire()  # 閿佷綇瀵规柟鐨勮处鎴?/span>
        # 浜ゆ槗#################
        _from.withdraw(amount)
        to.deposit(amount)
        #################
        to.lock.release()
        _from.lock.release()
        mylock.release()

def hashlock(_from,to):
    hash1 = hashlib.md5()
    hash1.update(bytes(_from.id, encoding=鈥?/span>utf-8鈥?/span>))
    hasha = hash1.hexdigest()
    hash = hashlib.md5()
    hash.update(bytes(to.id, encoding=鈥?/span>utf-8鈥?/span>))
    hashb = hash.hexdigest()
    return hasha,hashb

a = Account(鈥?/span>a鈥?/span>, 1000)
b = Account(鈥?/span>b鈥?/span>, 1000)
mylock = threading.Lock()
#a寰€b杞处100
t1 = threading.Thread(target=transfer, args=(a, b, 100))
t1.start()
#b寰€a杞处200
t2 = threading.Thread(target=transfer, args=(b, a, 200))
t2.start()
t1.join()
t2.join()
print("a鐨勮处鎴蜂綑棰濓細",a.balance)
print("b鐨勮处鎴蜂綑棰濓細",b.balance)
View Code

python涓娇鐢ㄤ笂涓嬫枃绠$悊鍣ㄦ潵瑙e喅鍔ㄦ€佺殑閿侀『搴忔閿侀棶棰橈紝褰撶劧杩樻槸鍥哄畾閿佺殑椤哄簭鎿嶄綔锛?/strong>Python涓閿佺殑褰㈡垚绀轰緥鍙婃閿佹儏鍐电殑闃叉

瑙e喅鏂规鏄负绋嬪簭涓殑姣忎竴涓攣鍒嗛厤涓€涓敮涓€鐨刬d锛岀劧鍚庡彧鍏佽鎸夌収鍗囧簭瑙勫垯鏉ヤ娇鐢ㄥ涓攣锛岃繖涓鍒欎娇鐢ㄤ笂涓嬫枃绠$悊鍣?鏄潪甯稿鏄撳疄鐜扮殑锛岀ず渚嬪涓嬶細

import threading
from contextlib import contextmanager
 
# Thread-local state to stored information on locks already acquired
_local = threading.local()
 
@contextmanager
def acquire(*locks):
  # Sort locks by object identifier
  locks = sorted(locks, key=lambda x: id(x))
 
  # Make sure lock order of previously acquired locks is not violated
  acquired = getattr(_local,鈥?/span>acquired鈥?/span>,[])
  if acquired and max(id(lock) for lock in acquired) >= id(locks[0]):
    raise RuntimeError(鈥?/span>Lock Order Violation鈥?/span>)
 
  # Acquire all of the locks
  acquired.extend(locks)
  _local.acquired = acquired
 
  try:
    for lock in locks:
      lock.acquire()
    yield
  finally:
    # Release locks in reverse order of acquisition
    for lock in reversed(locks):
      lock.release()
    del acquired[-len(locks):]

濡備綍浣跨敤杩欎釜涓婁笅鏂囩鐞嗗櫒鍛紵浣犲彲浠ユ寜鐓ф甯搁€斿緞鍒涘缓涓€涓攣瀵硅薄锛屼絾涓嶈鏄崟涓攣杩樻槸澶氫釜閿佷腑閮戒娇鐢?acquire() 鍑芥暟鏉ョ敵璇烽攣锛?绀轰緥濡備笅锛?/p>

import threading
x_lock = threading.Lock()
y_lock = threading.Lock()
 
def thread_1():
  while True:
    with acquire(x_lock, y_lock):
      print(鈥?/span>Thread-1鈥?/span>)
 
def thread_2():
  while True:
    with acquire(y_lock, x_lock):
      print(鈥?/span>Thread-2鈥?/span>)
 
t1 = threading.Thread(target=thread_1)
t1.daemon = True
t1.start()
 
t2 = threading.Thread(target=thread_2)
t2.daemon = True
t2.start()

濡傛灉浣犳墽琛岃繖娈典唬鐮侊紝浣犱細鍙戠幇瀹冨嵆浣垮湪涓嶅悓鐨勫嚱鏁颁腑浠ヤ笉鍚岀殑椤哄簭鑾峰彇閿佷篃娌℃湁鍙戠敓姝婚攣銆?鍏跺叧閿湪浜庯紝鍦ㄧ涓€娈典唬鐮佷腑锛屾垜浠杩欎簺閿佽繘琛屼簡鎺掑簭銆傞€氳繃鎺掑簭锛屼娇寰椾笉绠$敤鎴蜂互浠€涔堟牱鐨勯『搴忔潵璇锋眰閿侊紝杩欎簺閿侀兘浼氭寜鐓у浐瀹氱殑椤哄簭琚幏鍙栥€?/p>

 

寮€鏀捐皟鐢?閽堝瀵硅薄涔嬮棿鍗忎綔閫犳垚鐨勬閿?锛?/strong>

瑙e喅鍗忎綔瀵硅薄涔嬮棿鍙戠敓鐨勬閿侊細闇€瑕佷娇鐢ㄥ紑鏀捐皟鐢紝鍗抽伩鍏嶅湪鎸佹湁閿佺殑鎯呭喌涓嬭皟鐢ㄥ閮ㄧ殑鏂规硶锛?strong>灏辨槸灏介噺灏嗛攣鐨勮寖鍥寸缉灏忥紝灏嗗悓姝ヤ唬鐮佸潡浠呯敤浜庝繚鎶ら偅浜涜璁″叡浜姸鎬佺殑鎿嶄綔銆?/p>

浣跨敤瀹氭椂閿?锛?/strong>

鍔犱笂涓€涓秴鏃舵椂闂达紝鑻ヤ竴涓嚎绋嬫病鏈夊湪缁欏畾鐨勬椂闄愬唴鎴愬姛鑾峰緱鎵€鏈夐渶瑕佺殑閿侊紝鍒欎細杩涜鍥為€€骞堕噴鏀炬墍鏈夊凡缁忚幏寰楃殑閿侊紝鐒跺悗绛夊緟涓€娈甸殢鏈虹殑鏃堕棿鍐嶉噸璇曘€?/p>

浣嗘槸濡傛灉鏈夐潪甯稿鐨勭嚎绋嬪悓涓€鏃堕棿鍘荤珵浜夊悓涓€鎵硅祫婧愶紝灏辩畻鏈夎秴鏃跺拰鍥為€€鏈哄埗锛岃繕鏄彲鑳戒細瀵艰嚧杩欎簺绾跨▼閲嶅鍦板皾璇曚絾鍗村缁堝緱涓嶅埌閿併€?/p>

 

6.姝婚攣妫€娴?/h3>

姝婚攣妫€娴嬶細姝婚攣妫€娴嬪嵆姣忓綋涓€涓嚎绋嬭幏寰椾簡閿侊紝浼氬湪绾跨▼鍜岄攣鐩稿叧鐨勬暟鎹粨鏋勪腑锛?map 銆?graph 绛夛級灏嗗叾璁颁笅銆傞櫎姝や箣澶栵紝姣忓綋鏈夌嚎绋嬭姹傞攣锛屼篃闇€瑕佽褰曞湪杩欎釜鏁版嵁缁撴瀯涓€傛閿佹娴嬫槸涓€涓洿濂界殑姝婚攣棰勯槻鏈哄埗锛屽畠涓昏鏄拡瀵归偅浜涗笉鍙兘瀹炵幇鎸夊簭鍔犻攣骞朵笖閿佽秴鏃朵篃涓嶅彲琛岀殑鍦烘櫙銆?br />鍏朵腑锛屾閿佹娴嬫渶鍑哄悕鐨勭畻娉曟槸鐢辫壘鍏规牸·杩澃鏂壒鎷夊湪 1965 骞磋璁$殑閾惰瀹剁畻娉曪紝閫氳繃璁板綍绯荤粺涓殑璧勬簮鍚戦噺銆佹渶澶ч渶姹傜煩闃点€佸垎閰嶇煩闃点€侀渶姹傜煩闃碉紝浠ヤ繚璇佺郴缁熷彧鍦ㄥ畨鍏ㄧ姸鎬佷笅杩涜璧勬簮鍒嗛厤锛岀敱姝ゆ潵閬垮厤姝婚攣銆?/p>

鎶€鏈浘鐗? src=

 

以上是关于Python澶氱嚎绋嬩箣姝婚攣的主要内容,如果未能解决你的问题,请参考以下文章

Java澶氱嚎绋嬪涔犳€荤粨涔?--澶氱嚎绋嬪熀纭€

澶氱嚎绋嬭绠梥tream parallelStream

瓒e浘锛氳€佹墜璋冭瘯澶氱嚎绋嬶紝666

澶氱嚎绋嬭鑰呭啓鑰呴棶棰?-鐢≦T瀹炵幇

NO.29 鏈夊涔冨ぇ锛氱嚎绋嬫睜

mysql姝婚攣com.mysql.cj.jdbc.exception.MYSQLTransactionRollbackException Deadlock found when trying to

(c)2006-2024 SYSTEM All Rights Reserved IT常识