English 中文(简体)
c#和java是否有相同的同步问题/概念?
原标题:Does c# and java have the same synchronization issues/concepts?

我只是学习 Java,我发现 Java的书/书大力强调同步。 我读到的就是一只docs/书,而你看不出对这个专题的高度重视。

c c#处理锁定/同步化,还是作为网络应用(应用库、iis、clr verus集装箱/jvm/tomcat)的不同工作?

最佳回答

<代码>lock和synchronized大体相同,尽管其重新实施有点不同,特别是在C# lock, 只是需要监测的合成糖。 进入/外包,而在 Java则没有相应的图书馆。

虽然可以使用<代码>,但C#没有同步方法。 方法(MethodImplOptions.Synchronized)],以取得同样的效果。 (我认为存在一些微妙的分歧,但大致相同)。) 不过,我不建议使用这两种语言,而是在私人锁上锁。

互联网和 Java的另一种一致性图书馆支助进一步分散,即目标类型。 Wait/Pulse/Pulse 所有这些都是类似的,但更高一级的支助相当不同。

记忆模式差别很大——如果你不努力工作而不再重新关闭,那么,正确的无锁编码就会有所不同。 NET和Java。

如何回答你的网络应用点......

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签