首页 \ 问答 \ 为什么要使用Hashtable.Synchronized?(Why use Hashtable.Synchronized?)

为什么要使用Hashtable.Synchronized?(Why use Hashtable.Synchronized?)

从MSDN文档:

“同步支持多个写入线程,前提是没有线程正在读取Hashtable。同步包装器在一个或多个读取器和一个或多个写入器的情况下不提供线程安全访问。”

来源: http//msdn.microsoft.com/en-us/library/system.collections.hashtable.synchronized.aspx

听起来我仍然需要使用锁,所以我的问题是为什么我们会使用Hashtable.Synchronized呢?


From the MSDN documentation:

"Synchronized supports multiple writing threads, provided that no threads are reading the Hashtable. The synchronized wrapper does not provide thread-safe access in the case of one or more readers and one or more writers."

Source: http://msdn.microsoft.com/en-us/library/system.collections.hashtable.synchronized.aspx

It sounds like I still have to use locks anyways, so my question is why would we use Hashtable.Synchronized at all?


原文:https://stackoverflow.com/questions/240906
更新时间:2023-11-26 22:11

最满意答案

GD严格用于绘图。 你需要一个文本布局引擎,如Pango


GD is strictly for drawing. You'll need a text layout engine such as Pango.

相关问答

更多
  • 当gd_info()返回一个数组时,这将显示您想要查看的内容 $a = gd_info(); echo '
    ' . print_r($a,1) . '
    '; As gd_info() returns an array, this will show what you want to see $a = gd_info(); echo '
    ' . print_r($a,1) . '
    ';
  • imagerotate返回false,因为发生了错误(可能$ imgsrc不存在?) 尝试在旋转前测试$ img: $imgsrc = 'uploaded/Tulips.jpg'; if (file_exists($imgsrc)) { $img = imagecreatefromjpeg($imgsrc); if ($img !== false) { imagealphablending($img, true); imagesavealpha($img, true); ...
  • 这是因为您的服务器上缺少GD库。 您必须启用库GD2。 找到你的(正确的) php.ini文件,然后找到该行: ;extension=php_gd2.dll ,删除前面的分号。 ( ;表示该行被注释掉,所以删除注释) 该行应该看起来像这样: extension=php_gd2.dll 然后重新启动apache,你准备好了。 This is because the GD Library is missing on your server. You must enable the library GD2. Fi ...
  • 如果您使用的是ubuntu或debian: apt-get install php5-gd If you are using ubuntu or debian based: apt-get install php5-gd
  • GD是用PHP编译的,在内部使用,没有必要提供GD的路径,在CI的手册中它指出: library_path:设置ImageMagick或NetPBM库的服务器路径。 如果您使用其中任何一个库,则必须提供路径。 提示:您没有使用ImageMagick或NetPBM 如果您的意思是ImageMagick,您可以找到二进制文件,您可以尝试以下命令: locate imagemagick 但它们通常位于/usr/bin或/usr/X11R6/bin/ GD is compiled with PHP, and is ...
  • 我重新安装了我的操作系统,问题消失了。 I've reinstalled my OS and problem's gone.
  • 以下是任何php扩展的步骤(在MS-Windows ): 给扩展目录提供绝对路径(不是相对路径)[使用正斜杠( / )而不是反斜杠( \ ); 我不太确定是否需要以尾随斜杠结束路径。 例如: extension_dir = c:/php5/ext 确保php引用你的php.ini ,现在php.ini可以在你的php安装root目录中。 如果您对php.ini的更改反映在phpinfo() ,那phpinfo() 。 如果没有,请参考php root dir中的INSTALL文件。 如果你将php作为模块绑 ...
  • GD严格用于绘图。 你需要一个文本布局引擎,如Pango 。 GD is strictly for drawing. You'll need a text layout engine such as Pango.
  • 在您的cPanel中,在软件/服务下,您将找到一个标题为PHP Config的图标,单击它并查找可用于安装的附加扩展,它是一个复选框列表,取消选中Imagick。 In your cPanel, Under Software/Services you will find an icon titled PHP Config click on it and look for Additional extensions available for Installation it is a list of chec ...
  • img标记返回alt值,因为您提供的图像不是正确的图像。 您需要在barcode.php修复代码本身,以便正确创建图像,并且应该首先在浏览器中检查结果,这样您就知道调用barcode.php的结果实际上是图像。 The img tag returns the alt value because the image that you have provided is not a correct image. You need to fix the code itself in barcode.php so t ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。