在某些系统(基于VmWare Horizon(最新版本)的虚拟化)上,WaitOne无法在创建互斥锁后直接获取它。需要等待100 ms或使用WaitOne并将超时设置为〜100 ms
代码示例
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
<ipython-input-44-5701e87866b7> in <module>
5 data = [a, b, c, d]
6 sns.set(style="whitegrid")
----> 7 ax = sns.barplot(x="x", y="y", data=data)
D:\anaconda\lib\site-packages\seaborn\categorical.py in barplot(x, y, hue,
data, order, hue_order, estimator, ci, n_boot, units, orient, color,
palette, saturation, errcolor, errwidth, capsize, dodge, ax, **kwargs)
3147 estimator, ci, n_boot, units,
3148 orient, color, palette, saturation,
-> 3149 errcolor, errwidth, capsize, dodge)
3150
3151 if ax is None:
D:\anaconda\lib\site-packages\seaborn\categorical.py in __init__(self, x,
y, hue, data, order, hue_order, estimator, ci, n_boot, units, orient,
color, palette, saturation, errcolor, errwidth, capsize, dodge)
1605 """Initialize the plotter."""
1606 self.establish_variables(x, y, hue, data, orient,
-> 1607 order, hue_order, units)
1608 self.establish_colors(color, palette, saturation)
1609 self.estimate_statistic(estimator, ci, n_boot)
D:\anaconda\lib\site-packages\seaborn\categorical.py in
establish_variables(self, x, y, hue, data, orient, order, hue_order,
units)
144 # See if we need to get variables from `data`
145 if data is not None:
--> 146 x = data.get(x, x)
147 y = data.get(y, y)
148 hue = data.get(hue, hue)
AttributeError: 'list' object has no attribute 'get'
获取具有错误
System.Threading.Mutex mutex = new System.Threading.Mutex(false, "MutexName");
bool acquire = mutex.WaitOne(0, false)
获取为真
您是否知道这种影响会发生什么,可能与该特定的虚拟化环境有关,还是可能在任何系统上发生?我注意到在常规系统(裸Windows或HyperV)上不会发生此问题。