Searching the newsgroups I found an interesting group called, searching that group I found one Pascal Lock-Free stack (which basically means not using a critical section, or any other mechanism, to lock the data). There is not thread safe stack in Borland Turbo Delphi 2006, so off course I started with a Google for delphi TThreadStack, which at this time gives zero results. In this post I will describe how I created my own.
But for one program I needed a thread safe stack. You've got some basic synchronization classes (TMutex, TEvent, TCriticalSection, TMultiReadExclusiveWriteSynchronizer.) and an basic data container (TThreadList).
In the Delphi language, which symbols or words def.I've moved my blog and it's post to my new blog, please go to Thread safe TStack (TThreadStack) on Landman Code Recently i've been doing a lot of multithreading, and luckily Delphi provides with a handy bunch of classes to make the developers life easier.In which memory area are local variables and proce.Which generics classes will destroy an object when.When working with a large number of records in the.What is different between Forms and DataModule in.Describe different concepts of oops in delphi.What is the difference between TList and TStringlist?.Function String_Reverse(S : String): String.Virtual and Dynamic Methods in Delphi.What are the different types of pointers used in D.What is the function of Dynamic arrays?.What are the reasons involved in using the interface?.What are the different types of inheritance presen.How does inheritance operate when using the object.What is the function of Inheritance in Delphi?.Q :- What is the difference between the SuperServe.Connection String with Firebird database in Delphi.
what is TADOQuery component for Delphi?.Procedure TForm1.Button1Click(Sender: TObject) Of its parent classes are added to the list box (found in the Delphi The user clicks the button, the name of the button’s class and the names It uses a button and a list box on a form. To obtain the ancestry of a component using the ClassType andĬlassParent properties. Here's a small example of the powers of the RTTI. The is operator, which performs dynamic type checking, is used to verify the actual runtime class of an object ans as operator performs checked typecasts. The is and as operators commonly used in Delphi language. RTTI provides a way to determine if an object's type is that of a particular class or one of its descendants. Runtime Type Information is information about an object's data type that is set into memory at run-time. Private Sub btnLast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLast.Click Private Sub btnFirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFirst.Click Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.ClickĬmCurrency.Position = cmCurrency.Position + 1 Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.ClickĬmCurrency.Position = cmCurrency.Position - 1 Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.ClickĭsDataset.Tables("mstCompanies").Rows(cmCurrency.Position).Item("Name") = txtName.TextĭsDataset.Tables("mstCompanies").Rows(cmCurrency.Position).Item("Address") = txtAddress.TextĭsDataset.Tables("mstCompanies").Rows(cmCurrency.Position).Item("City") = txtCity.Text Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.ClickĭsDataset.Tables("mstcompanies").Rows.Add(newrow) LastUID = dsDataset.Tables("mstcompanies").Rows(dsDataset.Tables("mstcompanies").Rows.Count - 1).Item("UID") Newrow = dsDataset.Tables("mstCompanies").NewRow Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click
Public Function bindFields(ByVal dtSrc As DataTable) (New ("Table", "mstCompanies"))ĬmCurrency = BindingContext(DataGridView1.DataSource, DataGridView1.DataMember) SqlDataAdapter.SelectCommand = sqlCommandĬmdBuilder = New (sqlDataAdapter)ĭsDataset.Tables(0).TableName = "mstcompanies" SqlCommand.CommandText = "select * from mstcompanies" Sqlconnection.ConnectionString = "Data Source=Manoj Initial Catalog=imported_data User ID=sa Password=sa" Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim sqlconnection As New ĭim sqlCommand As New ĭim sqlDataAdapter As New ĭim cmdBuilder As