
assing/kaathirikkuka

computer prograamingil, async/veytt paatten ennathu niravadhi prograaming bhaashakalude vaakyaghadana savisheshathayaanu, ithu oru asinkranas, noonn-blocking functione oru saadhaarana sinkranas functionu samanamaaya reethiyil krameekarikkaan anuvadikkunnu. ithu ardhaparamaayi oru corotin enna ashayavumaayi bandhappettirikkunnu, palappozhum samanamaaya saankethikavidyakal upayogichu nadappilaakkunnu, koodaathe saadhaaranayaayi vaagdaanangalo samanamaaya dattaa gadanakalo prathinidheekarikkunna deerghakaala, asinkranas task poortthiyaakkaan kaathirikkumbol mattu coode execute cheyyaanulla avasarangal nalkaan praadhamikamaayi uddeshichullathaanu. sii #5, sii + + 20, paitthan 3.5, eph #, hack, juuliya, dart, coatlin 1.1, rust 1.39, niim 0.9.4, jaavaaskript ezz 2017, swift 5.5, sig ennivayil eee savisheshatha kaanapedunnu, ekstenshanukal, beetta pathippukal, skaalayude prathyeka nadappaakkalukal ennivayil chila pareekshanathmaka pravartthanangal undu.
charithram.
2007ll eph #pathipp 2ll kaathiripp pooyintukalulla asinkranas workflokal chertthu. ithu sii #-ll cherttha assing/avettu samvidaanathe swaadheenichu.
microsopht aadyamaayi assing sii. tii. piyil (2011) assing/avettu ulla sii #-nte oru pathipp puratthirakki. pinneedu sii #5 (2012) ll audyogikamaayi puratthirangi.
haskell leed developer simoon marlo 2012 ll assing paakkej srishtichu.
2015ll pathipp 3.5-ll cockhess 1, cockhess 2 ennee 2 puthiya keevedukal cherthukondu paitthan assing/avettu pinthunaykkunnu.
2015-ll pathipp 1.7-ll typescript assing/veytt pinthunaykkunnu.
2017ll jaavaaskript editionte bhaagamaayi jaavaaskript assing/avettu ennathinu pinthuna chertthu.
2019ll oru puthiya keywade kookk _ 1, alasamaaya iwal veytt paatten ennivayulla pathipp 1.39.0 upayogichu assing/veytt pinthunaykkaayi rust chertthu.
sii + + 2020-ll 3 puthiya keevedukal cocks _ 4, cocks _ 5, cocks _ 6 enniva upayogichu assaink/veytt pathipp 20-nulla pinthuna chertthu.
2021-ll 5.5-aamm pathippinoppam assing/veyttinulla pinthuna thwarithappeduthi, 2 puthiya keevedukal cocks _ 1, cocks _ 2 enniva chertthu. purathu ninnu oro nadanilekkum madhyasthatha vahikkaan assing/veytt upayogikkunna cocks _ 9 keywade upayogichu nadan modalinte vyakthamaaya nadappakkalinoppam ithu puratthirakki.
udaaharanathinu sii #.
oru yooriyil ninnu oru resource daunlodu cheyyukayum resourcinte neelam nalkukayum cheiyunna chuvadeyulla sii #function eee assing/veytt paatten upayogikkunnu
pothu assing task <int> findpagesing (yoori yoori) 
 vaar klayant = puthiya HTTPclient ();
 baitt [] daatta = klayantinaayi kaathirikkuka.getbaittiyerayaasing (yuri);
 daatta thirike nalkuka.neelam;
assing/avettu upayogikkunna oru function aavashyamullathra cockways _ 2 expressionukal upayogikkaam, oronnum ore reethiyil kaikaaryam cheyyum (aadya kaathirippinaayi oru vaagdaanam maathrame vilikkunnayaalkk thirike labhikkoovenkilum, kaathirikkunna mattellaavarum aantharika kolbaakkukal upayogikkum). oru function oru vagdana object nerittu kaivasham vaykkukayum aadyam mattu prosessing nadathukayum (mattu asinkranas jolikal aarambhikkunnath ulppede) vaagdaanam athinte phalam aavashyamaayi varunnathuvare kaathirikkunnathu vaikippikkukayum cheyyum. vaagdaanangalulla functionukalkku oresamayam allengil eathenkilum prathyeka paattenil onniladhikam vaagdaanangalkkaayi kaathirikkaan ningale anuvadikkunna vagdana samaaharana reethikalum undu (c #nte cockways _ 27 polullava, aargumentukalile ellah jolikalum pariharikkappedumbol pariharikkappedunna moolyamillaatha cockways _ 18 nalkunnu). pala vagdana tharangalkkum assing/veytt paatten saadhaaranayaayi upayogikkunnathinekkaal kooduthal savisheshathakalundu, udaaharanathinu onniladhikam resolet colback sajjeekarikkaano prathyekichu deerghakaalamaayi thudarunna oru joliyude purogathi parishodhikkaano kazhiyum.
sii #-nte prathyeka kesilum eee bhasha savisheshathayulla mattu pala bhaashakalilum, assing/veytt paatten bhaashayude rantaim-nte oru pradhana bhagamalla, marichu compile samayat lamdas allengil thudarchakalode nadappilaakkunnu. udaaharanathinu, sii #compiler melpparanja coode athinte ail bitecode formattilekku vivarthanam cheiyunnathinu munbu inipparayunnathupolulla onnilekku vivarthanam cheyyum
pothu chumatala <int> findpagesising (yoori yoori) 
 vaar klayant = puthiya HTTPclient ();
 task <baitt []> daattaask = klayant.getbaittiyerayaasing (yuri);
 task <int> afterdatasku = daattaask.thudarcha ((orijinal task) => {
 orijinal task thirike nalkuka.phalam.neelam;
 pingamiyaayi madanguka;
ekkaaranathaal, oru interface reethikk oru vagdana vasthu thirike nalkendathundengilum eathenkilum asinkranas jolikalkkaayi kaathirikkaan shareerathil cocks _ 2 aavashyamillengil, athinu cocks _ 1 modifier aavasyamilla, pakaram oru vagdana vasthu nerittu thirike nalkaan kazhiyum. udaaharanathinu, oru function chila phala moolyathilekku (sii #nte cockways _ 31 polullava) udan pariharikkappedunna oru vaagdaanam nalkaan kazhinjekkum, allengil athu mattoru reethiyude vaagdaanam nalkiyekkaam, athu aavashyamaaya krithyamaaya vaagdaanamaayirikkum (ovarlodilekku maattivaykkumbol polullava).
ennirunnaalum, eee pravartthanatthinte oru pradhana munnariyipp, coode parambaraagatha blocking kodinode saamyamullathaanenkilum, coode yadhaarthathil noonn-blocking aanu, multithread aayirikkam, athaayath oru kookk _ 2 targettucheytha vaagdaanathinaayi kaathirikkumbol niravadhi edapedal sambhavangal sambhavikkam. udaaharanathinu, thaazhepparayunna coode, ellaayppozhum cockways _ 2 illaathe oru blocking modalil vijayikkumbol, cockways _ 2 samayat edapedal sambhavangal anubhavappedaam, angane athinte keezhil ninnu pankitta avastha maarunnathayi kandethaam
vaar a = avastha.eiii;
vaar klayant = puthiya HTTPclient ();
vaar daatta = klayantinaayi kaathirikkuka.getbaittiyerayaasing (yuri);
debug cheyyuka.urappikkuka (a = = avastha.a);// saadhyathayulla parajayam, samsthaanathinte moolyamaayi.orupakshe maattappettirikkam
 //edapedaanulla saadhyathayulla sambhavathinte kaikaaryam cheiyunnayaal.
daatta thirike nalkuka.neelam;
eph #ll.
2007ll, eph #pathipp 2-noppam asinkranas workflokal chertthu. asinkranas workflokal ce (computation expressionukal) aayi nadappilaakkunnu. prathyeka sandarbhangalonnum vyakthamaakkathe avaa nirvachikkaan kazhiyum (c #-ll cocew _ 1 pole). eph #asinkranas workflokal oru spodanam cherkkunnu (!) asinkranas jolikal aarambikkunnathinulla keevedukal.
thaazhepparayunna assing function oru asinkranas workflow upayogichu oru urlil ninnu daatta daunlodu cheiyunnu
asyncompages (eurisa #seq <uri>): async <inttu> = async {
 HTTPclient = puthiya HTTPclient () upayogikkuka
 anuvadikkoo! pejukal = 
 euris
 |> sec.mapp (HTTPclient.getstringsing "assing".kaathiripp)
 |> assing.samaantharamaayi
 madangivarunna thaalukal |> sec.madakkuka (rasakaramaaya shekharana karant-> karant.neelam + shekharanam) 0
sii #ll.
2012-ll, sii #, task adhishtitha asinkranas paatten (tapp) ennu microsopht visheshippikkunna 5.0-aamm pathippinoppam sii #-ll assing/avettu paatten chertthu. assing reethikal saadhaaranayaayi kookk 36, kookk 18, kookk 12, kookk 39 allengil kookk 40 enniva nalkunnu. upayokthru kodinu ishtaanusritha "assing reethi nirmmathaakkal" vazhi assing reethikalkku thirike nalkaan kazhiyunna ishtaanusritha tharangale nirvachikkaan kazhiyum, pakshe ithu oru noothanavum apoorvavumaaya saahacharyamaan. kookk 36 thirike nalkunna assing reethikal ivant handlermarkayi uddeshichullathaanu; mikka kesukalilum oru sinkranas reethi kookk 36 thirike nalkunnuvenkil, pakaram kookk 18 thirike nalkunnathu shupaarsha cheiyunnu, kaaranam ithu kooduthal avabodhajanyamaaya exption handling anuvadikkunnu.
cocks _ 2 upayogikkunna reethikal cocks _ 1 keywade upayogichu prakhyapikkanam. kookk 12 enna tharatthilulla ritten moolyamulla reethikalil, kookk 1 upayogichu prakhyaapicha reethikalil kookk 12 nuu pakaram kookk 48 nuu nalkaavunna tharatthilulla ritten stettment undaayirikkanam; compiler kookk 12 genericle moolyam pothinjirikkunnu. cocks 1 illaathe prakhyapikkappetta ritten tharam cocks 18 allengil cocks 12 ulla cocks 2 reethikalum saadhyamaan.
thaazhepparayunna assing reethi cockways _ 2 upayogichu oru urlil ninnu daatta daunlodu cheiyunnu. eee reethi cockways _ 2 keywade upayogichu poortthiyaakkunnathinu munbu oro euric oru task nalkunnathinaal, aduthathu looad cheyyaan aarambhikkunnathin munbu avasana resource poortthiyaakunnathuvare kaathirikkunnathinuparam resourceukalkku ore samayam looad cheyyaan kazhiyum.
pothu assing task <int> sumpajisissing (ennaavunna <uri> euris) 
 vaar klayant = puthiya HTTPclient ();
 motham int = 0;
 vaar lodyoorittaaskukal = puthiya listt <task <baitt [] "();
 forch (yoorisile vaar yoori)
 vaar loduritask = klayant.getbaittiyerayaasing (yuri);
 looad ritaaskukal.cherkkuka (loduritask);
 forch (lodyoorittaaskil vaar loduritask)
 staattastekt.tekst = $"kandethiya {motham} bitukal...";
 vaar resourcesbiteukal = loduritask kaathirikkuka;
 motham + = resourcesbiteukal.neelam;
 staattastekt.vaachakam = $"motham bitukal kandethi";
 motham varumanam;
skaalayil.
skaalayilekkulla pareekshanathmaka scala-assing ekstenshanil, ithu oru "reethi" aanu, ennirunnaalum ithu oru saadhaarana reethi pole pravarthikkunnilla. koodaathe, oru reethi assing ennu adayaalappeduthenda sii #5-ll ninnu vyathyasthamayi, scala-assingle, kodinte oru "block" oru assing "kooll kondu chuttappettirikkunnu.
athu engane pravartthikkunnu.
scala-assingle, yadhaarthathil oru scala macro upayogichaanu nadappilaakkunnathu, ithu compiler vyathyastha coode purappeduvikkaanum oru parimithamaaya stettu mesheen nadappaakkal srishtikkaanum kaaranamaakunnu (ithu oru monadic nadappaakkalinekkaal kaaryakshamamaayi kanakkaakkappedunnu, pakshe kaikondu ezhuthaan soukaryapradamalla).
asymcronous allathava ulppede vividha nadappaakkalukale pinthunaykkunnathinaayi scala-asimkinu padhathikalundu.
paitthanil.
paitthan 3.5 (2015) pep 492 (yoori selibanov ezhuthukayum nadappilaakkukayum cheytha) ll vivarichirikkunnathu assing/veyittinulla pinthuna chertthu.
asyncio irakkumathi cheyyuka
assing def maine ():
 print cheyyuka ("haloo")
 asymsio kaathirikkuka.urakkam (1)
 print ("waled")
asymsio.rann (maine ())
jaavaaskriptil.
jaavaaskripttile veytt oopparettar oru assing functionullil ninno oru modyoolinte mukalile thalatthil ninno maathrame upayogikkaan kazhiyoo. paaraameettar oru vaagdaanamaanenkil, vaagdaanam pariharikkappedumbol assing function nadappilaakkunnathu punararambhikkum (vaagdaanam nirasichillenkil, eee saahacharyathil saadhaarana jaavaaskript exption handling upayogichu kaikaaryam cheyyaan kazhiyunna oru pishak eriyappedum). paaraameettar oru vaagdaanamallengil, paaraameettar thanne udan thirike nalkum.
pala librarikalum praadeshika jaavaaskript vaagdaanangalude savisheshathayumaayi poruthappedunnidatholam kaalam kaathirikkunnathinoppam upayogikkaavunna vagdana vasthukkal nalkunnu. ennirunnaalum, jecuri libraryil ninnulla vaagdaanangal jecuri 3 vare vaagdaanangal/eiii + anuyojyamaayirunnilla.
ivide oru udaaharanam (eee lekhanathil ninnu parishkkaricha):
assing function createnudoc () {
 prathikaranam = db-naayi kaathirikkuka.poost ({});// oru puthiya dookt poost cheyyuka
 db thirike nalkuka.(prathikaranam.aidi);// aidi vazhi kandethuka
assing function maine () {
 sramikkuka {
 doock = createnevdock ()-naayi kaathirikkuka;
 kansol.logue (doock);
 } pidikkuka (thettu) {
 kansol.logue (thettu);
pradhana ();
nooad.staanderd library colback adisthaanamaakkiyulla reethikal vaagdaanangalaayi upayogikkaan prapthamaakkunna oru yoottility js pathipp 8 ulppedunnu.
sii + + ll.
sii + + ll, veytt (sii + + ll coavite ennu perittirikkunnu) audyogikamaayi pathipp 20-lake layippichu. athinu pinthuna, corotins, koodaathe kokwos _ 5 polulla keevedukal jisisi, msvc compilerukalil labhyamaan, athesamayam clanginu bhagika pinthunayundu.
STD:: vaagdaanavum STD:: bhaviyum, avaa kaathirikkaavunna vasthukkalaanennu thonnumenkilum, koroottinukalil ninnu thirike nalkendathum koavettu upayogichu kaathirikkendathumaaya yanthrangalonnum nadappilaakkaruthu. programmermar ritten tharatthil coach _ 58, coach _ 59, coach _ 60 thudangiya niravadhi pothu anga pravartthanangal nadappaakkanam. vishadaamshangal sii. pii. pii. referencil kaanam.
namespace ezz. tii. dii. upayogikkunnu;
ishtaanusrithamaayi kaathirikkaavunna task <int> cherkkuka (int a, int b)
 int sii = eiii + bii;
 qoo ritten sii;
ishtaanusrithamaayi kaathirikkaavunna task <int> testt ()
 int rettu = qoo _ weyit aadu (1,2);
 cout "ritten" rettu endell;
 qoo ritten rettu;
int maine ()
 oottoo task = testt ();
 0 thirike nalkuka;
sii.
sii bhashayil kaathirikkuka/samanvayippikkuka ennathinu ithuvare audyogika pinthunayilla. s _ task polulla chila corotin librarikal maakrosumaayi kaathirikkunnu/samanvayippikkunnu enna keevedukal anukarikkunnu.
// jolikalkkaayi staakk memory nirvachikkuka
int jii _ staakk _ maine [64 * 1024/saisof (int)];
int jii _ staakk0 [64 * 1024/saisof (int)];
int jii _ staakk1 [64 * 1024/saisof (int)];
shoonyamaaya sub task (_ _ assing _, shoonyamaaya * aarji) {
 int aii;
 int n = (innu) (sais _ tii) aarg;
 (i = 0; i <5; + + i) {
 printef ("task% d, delay secondukal =% d, i =% d\n", n, n, i);
 s _ task _ ems sleep (_ _ kaathirikkuka _, n * 1000);
 //s _ task _ yealed (_ _ kaathirikkuka _);
maine task shoonyamaakkuka (_ _ assing _, shoonyamaakkuka * aarji) {
 int aii;
 //rund upa-chumathalakal srishtikkuka
 s _ task _ kriyett (g _ staakk0, saisof (g _ staakk0), sub task, (void *) 1);
 s _ task _ kriyett (g _ staakk1, saisof (g _ staakk1), sub task, (void *) 2);
 (i = 0; i <4; + + i) {
 printef ("task _ maine aarg =% p, i =% d\n", aarg, i);
 s _ task _ yealed (_ _ kaathirikkuka _);
 //purathekkulla upa chumathalakalkkayi kaathirikkuka
 s _ task _ joyin (_ _ kaathirikkuka _, g _ staakk 0);
 s _ task _ joyin (_ _ kaathirikkuka _, g _ staakk 1);
int maine (int arjisi, chaar * arjvi) {
 s _ task _ init _ sisttam ();
 //pradhana dauthyam srishtikkuka
 s _ task _ kriyett (g _ staakk _ maine, saisof (g _ staakk _ maine), maine _ task, (void *) (sais _ tii) arjisi);
 s _ task _ joyin (_ _ kaathirikkuka _, g _ staakk _ maine);
 print eph ("ellah jolikalum ovar enn");
 0 thirike nalkuka;
pell 5 ll.
bhaavi asinkavaitt module 2018 septambaril oru pell foundeshan graantinte vishayamaayirunnu.
thurumbukalil.
2019 november 7 nuu, thurumbinte sthiramaaya pathippil assing/avettu puratthirangi. bhaaviyile swabhaavam nadappilaakkunna moolyangal nalkunna playin functionukalilekku rust desugaaril assing functionukal. nilavil avaa oru parimithamaaya samsthaana yanthram upayogichaanu nadappilaakkunnathu.
// pettiyude charakkukalil.ennirunnaalum, dependency vibhaagathil namukk 'fuechezhs =' 0.3 'aavasyamaanu,
// athinaal namukk fuechezhs krettu upayogikkaam
eksttarn krettu fuechezhs;// nilavil 'ezz. tii. dii' libraryil executor illa.
// ithupolulla enthengilum
// fn assing _ aadu _ vann (samkhya yuu32)-> bhaviyil <outtputtu = yuu32>
assing fn assing _ aadu _ vann (samkhya yuu 32)-> yuu 32 {
 nambar + 1
assing fn udaaharanam _ task () {
 nambar = assing _ aadu _ vann (5).kaathirikkuka;
 println!("5 + 1 = {}", samkhya);
efn maine () {
 //bhaavi srishtikkunnathu nirvvahanam aarambikkunnilla.
 bhaviye = udaaharanam _ task ();
 //jaavaaskriptil ninnu vyathyasthamayi, nammal yadhaarthathil athu votteduppikkumbol maathrame 'bhaavi' nadappilaakkoo.
 fyoochezhsa executor: block _ oonn (future);
vegathil.
seey-0296ll vivarichirikkunnathu swift 5.5 (2021) assing/veyittinulla pinthuna chertthu.
funk getnambar () assing throw-> inttu {
 jolikkayi kaathirikkaan sramikkuka.urakkam (nanosecondukal 1,000,000)
 42 thirike nalkuka
chumatala {
 aadyam = kaathirikkaan sramikkuka ()
 second = kaathirikkaan sramikkuka ()
 print (aadya + randaam)
aanukoolyangalum vimarsanangalum.
athine pinthunaykkunna bhaashakalile assing/veytt paatteninte oru pradhana nettam, asinkranas, noonn-blocking coode ezhuthaam, kuranja overhead upayogichu, parambaraagatha sinkranas, blocking coode pole kaanapedunnu ennathaanu. prathyekichum, sandesham-passing prograamukalil asinkranas coode ezhuthunnathinulla ettavum nalla maarggam kaathirikkuka ennaanu vaadikkappedunnathu; prathyekichum, coode thadayunnathinodu aduthirikkunnathum vaayanakshamathayum boilerplate kodinte kuranja alavum kaathiripp aanukoolyangalaayi udharikkappettu. thalphalamaayi, assing/veytt mikka programarmaarkkum avarude prograamukalekkurichu nyaayavaadam cheiyunnathu eluppamaakkunnu, koodaathe kaathirikkuka ennathu aavasyamulla aaplikkeshanukalil mikachathum kooduthal karuthuttathumaaya noonn-blocking coode prothsaahippikkunnu. graaphikkal user interfaceukal avatharippikkunna prograamukal muthal geyimukal, saambathika aaplikkeshanukal polulla valia alavilulla stettful server-side prograamukal vare atharam aaplikkeshanukal undu.
kaathirippine vimarshikkumbol, kaathiripp chuttumulla kodine asinkranas aakkunnuvenn sradhikkappettittundu; maruvashathu, kodinte eee pakarchavyaadhi swabhaavam (chilappol oru "sombi virusumaayi" thaarathamyam cheyyappedunnu) ellaatharam asinkranas prograamingilum antharleenamaanennu vaadikkappettittundu, athinaal kaathirikkuka ennathu ekkaaryathil savisheshamalla.

